Fix `w.dbTx` race
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.