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
Adds a "sweep" command to kaspawallet
#2018
Conversation
cmd/kaspawallet/sweep.go
Outdated
//[1] represents the tested unsigned transaction | ||
dummyTransactionWindow[1] = newDummyTransaction() | ||
lastValidTx := newDummyTransaction() | ||
currentTx := newDummyTransaction() //i.e. the tested tx | ||
|
||
//loop through utxos commit segments that don't violate max mass | ||
for i, currentUTXO := range selectedUTXOs { | ||
|
||
if currentIdxOfSplit == 0 { |
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.
I think this variable is actually doing nothing. On the first iteration lastValidTx
and currentTx
are actually fresh and empty, and you reset them every time you set currentIdxOfSplit
to 0
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.
currentIdxOfSplit
? this is needed to reset lastValidTx
and currentTx
, for a new split transaction. I agree it doen't do anything during the first iteration, so if you want I can do an extra check with && i != 0
before entering the scope. But it is needed to reset the Txs after each split, excluding the first.
Codecov Report
@@ Coverage Diff @@
## dev #2018 +/- ##
==========================================
- Coverage 59.78% 59.37% -0.42%
==========================================
Files 667 671 +4
Lines 31795 32033 +238
==========================================
+ Hits 19008 19018 +10
- Misses 10058 10287 +229
+ Partials 2729 2728 -1
Continue to review full report at Codecov.
|
Implements #1990
Overveiw:
externalapi.DomainTransaction
s