-
Notifications
You must be signed in to change notification settings - Fork 224
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
CLI spend command makes exact change #593
CLI spend command makes exact change #593
Conversation
@@ -106,6 +106,11 @@ where | |||
&self, | |||
transaction: Transaction, | |||
) -> Result<(), TransactionSubmissionError> { | |||
// we already processed the transaction before the request was received |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discovered this bug when an epoch is processed before the submit_transaction occurs.
98a9d4d
to
a8746cd
Compare
Besides my 1 comment this looks good. And my comment is more of an optimization. |
a8746cd
to
f47d493
Compare
Codecov ReportBase: 72.38% // Head: 72.43% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #593 +/- ##
==========================================
+ Coverage 72.38% 72.43% +0.04%
==========================================
Files 85 85
Lines 11516 11543 +27
==========================================
+ Hits 8336 8361 +25
- Misses 3180 3182 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
LGTM. @elsirion would you take a look, too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Would be nice if the RNG change and the tx submission fix were separate commits for ease of review.
The
receive_coins
function is the way we should transfer ecash in production because it's the safer/faster option.However, for demonstrating ecash as a bearer note, this changes the
spend_ecash
function so that it will reissue exact change for spending.Fixes #592