From f977db4e4b6d3fe720bf7b76bcbc2c5a9cea654c Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Fri, 24 May 2024 16:38:32 +0000 Subject: [PATCH] [release-v2.0] Record derived mixing change addresses 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. Backport of f28defebc2c1d009a9014f988b98eee13f3d52dc. --- wallet/mixing.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wallet/mixing.go b/wallet/mixing.go index 3c9d519ac..4e4ce76ea 100644 --- a/wallet/mixing.go +++ b/wallet/mixing.go @@ -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())