Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the frozen amount to be at least 40,000 BOA #444

Merged
merged 1 commit into from Dec 16, 2019

Conversation

@TrustHenry
Copy link
Member

TrustHenry commented Dec 9, 2019

according to the Yellow White Paper

It has at least 40,000 coins

// Second Transaction is invalid.
assert(!secondTx.isValid(findUTXO, 0));
// Second Transaction is valid.
assert(secondTx.isValid(findUTXO, 0));

This comment has been minimized.

Copy link
@AndrejMitrovic

AndrejMitrovic Dec 9, 2019

Member

Look at the comment in line 446. That comment needs to be changed too.

This comment has been minimized.

Copy link
@TrustHenry

TrustHenry Dec 9, 2019

Author Member

Good eye :) applied the suggest

if (sum_unspent != Amount.FreezeAmount)
return "Transaction: Only available when the amount is 40,000";
if (sum_unspent.integral() < Amount.FreezeAmount.integral())
return "Transaction: available when the amount is least 40,000 BOA";

This comment has been minimized.

Copy link
@AndrejMitrovic

AndrejMitrovic Dec 9, 2019

Member
Suggested change
return "Transaction: available when the amount is least 40,000 BOA";
return "Transaction: available when the amount is at least 40,000 BOA";

This comment has been minimized.

Copy link
@TrustHenry

TrustHenry Dec 9, 2019

Author Member

applied the suggest

@@ -94,8 +94,8 @@ public string isInvalidReason (const Transaction tx, UTXOFinder findUTXO,
return "Transaction: Can only freeze a Payment transaction";
}

if (sum_unspent != Amount.FreezeAmount)

This comment has been minimized.

Copy link
@AndrejMitrovic

AndrejMitrovic Dec 9, 2019

Member

Amount.FreezeAmount should then be renamed to Amount.MinFreezeAmount, to make it obvious that it's the minimum freeze amount, not exact freeze amount.

This comment has been minimized.

Copy link
@TrustHenry

TrustHenry Dec 9, 2019

Author Member

applied the suggest

@codecov

This comment has been minimized.

Copy link

codecov bot commented Dec 9, 2019

Codecov Report

Merging #444 into v0.x.x will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           v0.x.x     #444   +/-   ##
=======================================
  Coverage   87.38%   87.38%           
=======================================
  Files          53       53           
  Lines        3622     3622           
=======================================
  Hits         3165     3165           
  Misses        457      457
Flag Coverage Δ
#integration 55.38% <0%> (-1.03%) ⬇️
#unittests 85.9% <100%> (ø) ⬆️
Impacted Files Coverage Δ
source/agora/node/Ledger.d 96.17% <100%> (ø) ⬆️
source/agora/consensus/Validation.d 94.93% <100%> (ø) ⬆️
source/agora/common/Amount.d 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a1c7a9...a81fe24. Read the comment docs.

according to the Yellow White Paper
renamed Amount.FreezeAmount to Amount.MinFrrzeAmount
@TrustHenry TrustHenry force-pushed the TrustHenry:freezeAmount branch from b732bce to a81fe24 Dec 9, 2019
@linked0
linked0 approved these changes Dec 9, 2019
@TrustHenry TrustHenry added this to the 2. Validator milestone Dec 10, 2019
@TrustHenry TrustHenry added this to In progress (Max 5) in Sprint #8 (2019-10-29 to 2019-11-12) via automation Dec 10, 2019
@Geod24 Geod24 changed the title Changed The frozen amount must be at least 40,000 BOA. Changed the frozen amount to be at least 40,000 BOA Dec 13, 2019
@AndrejMitrovic AndrejMitrovic merged commit 6bbd491 into bpfkorea:v0.x.x Dec 16, 2019
12 checks passed
12 checks passed
MacOS (macOS-latest, dmd-2.089.0)
Details
MacOS (macOS-latest, dmd-2.088.1)
Details
MacOS (macOS-latest, dmd-master)
Details
Linux (ubuntu-latest, dmd-2.089.0)
Details
Linux (ubuntu-latest, dmd-2.088.1)
Details
Linux (ubuntu-latest, ldc-1.18.0)
Details
Linux (ubuntu-latest, ldc-1.17.0)
Details
Linux (ubuntu-latest, dmd-master)
Details
Linux (ubuntu-latest, ldc-master)
Details
Travis CI - Pull Request Build Passed
Details
ci/circleci: build Your tests passed on CircleCI!
Details
ci/dockercloud Your tests passed in Docker Cloud
Details
Sprint #8 (2019-10-29 to 2019-11-12) automation moved this from In progress (Max 5) to Done Dec 16, 2019
@Geod24

This comment has been minimized.

Copy link
Member

Geod24 commented Dec 16, 2019

@TrustHenry : Please leave an empty line between the title and the commit message.
Currently your title is over 100 character, which makes it very hard to read.
This is what I see in the console:
Screen Shot 2019-12-16 at 18 26 02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.