Skip to content

Commit

Permalink
Record derived mixing change addresses
Browse files Browse the repository at this point in the history
These database updates were being appended to a slice of updates to run in the
future, but no such updates ever took place.

Since this is only done here for change addresses, and only one address is
derived a time from this method, remove the deferred update batching and
instead just record the derived address in the DB immediately.
  • Loading branch information
jrick committed May 24, 2024
1 parent 9dbfe06 commit f28defe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions wallet/mixing.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,8 @@ SplitPoints:
}

var change *wire.TxOut
var updates []func(walletdb.ReadWriteTx) error
if changeValue > 0 {
persist := w.deferPersistReturnedChild(ctx, &updates)
persist := w.persistReturnedChild(ctx, nil)
const accountName = "" // not used, so can be faked.
addr, err := w.nextAddress(ctx, op, persist,
accountName, changeAccount, udb.InternalBranch, WithGapPolicyIgnore())
Expand Down

0 comments on commit f28defe

Please sign in to comment.