Skip to content

Fix `w.dbTx` race

Luke Champine requested to merge bbolt into master

The w.dbTx in NewCustomWallet races against the w.dbTx in syncDB (called by threadedDBUpdate). For large wallets, threadedDBUpdate can fire before NewCustomWallet returns, invalidating its copy of w.dbTx and causing a panic. This PR moves the creation of w.dbTx from NewCustomWallet to initPersist, ensuring that threadedDBUpdate is not spawned until db initialization finishes.

Also update our vendored bbolt with the latest changes.

Merge request reports