You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is an unexpected event, a crash, shutdown, power-loss or similar when a block is being added to the wallet, it can possibly lead to invalid state for the wallet with some transactions left unconfirmed or missing entirely.
The tip for the wallet is set before the transactions have been completely added. Thus if there is an issue, and the transactions are not added. The next startup will begin at the next block, instead adding the block again and adding all of the transactions.
If there is an unexpected event, a crash, shutdown, power-loss or similar when a block is being added to the wallet, it can possibly lead to invalid state for the wallet with some transactions left unconfirmed or missing entirely.
The
tip
for the wallet is set before the transactions have been completely added. Thus if there is an issue, and the transactions are not added. The next startup will begin at the next block, instead adding the block again and adding all of the transactions.The relevant lines of code are in
addBlock
oflib/wallet/walletdb.js
:https://github.com/bcoin-org/bcoin/blob/master/lib/wallet/walletdb.js#L1978-L1991
Those missing or unconfirmed transactions can then lead to cascading issues with other transactions failing to confirm from an assertion,
assert(coin.height !== -1)
, inconfirm()
oflib/wallet/txdb.js
: https://github.com/bcoin-org/bcoin/blob/master/lib/wallet/txdb.js#L663The text was updated successfully, but these errors were encountered: