Skip to content

Commit

Permalink
wallet: fix TestWalletRedistribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Dec 15, 2023
1 parent 9436b77 commit 53dac7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func (w *SingleAddressWallet) Redistribute(cs consensus.State, outputs int, amou

for outputs > 0 {
var txn types.Transaction
for i := 0; outputs > 0 && i < redistributeBatchSize; i++ {
for i := 0; i < outputs && i < redistributeBatchSize; i++ {
txn.SiacoinOutputs = append(txn.SiacoinOutputs, types.SiacoinOutput{
Value: amount,
Address: w.Address(),
Expand Down Expand Up @@ -434,6 +434,7 @@ func (w *SingleAddressWallet) Redistribute(cs consensus.State, outputs int, amou
w.lastUsed[sce.ID] = time.Now()
}

outputs -= len(txn.SiacoinOutputs)
txns = append(txns, txn)
}

Expand Down

0 comments on commit 53dac7c

Please sign in to comment.