bcoin-org / bcoin

Javascript bitcoin library for node.js and browsers
https://bcoin.io
Other
3.01k stars 811 forks source link

Addresses derived during wallet creation aren't watched by the pool #61

Closed dworznik closed 8 years ago

dworznik commented 8 years ago

When creating a wallet, add address events are emitted during the key derivation, but callbacks for them are not registered until the wallet is added to the pool. When I run the example SPV app, it's impossible to get the derived keys to be watched by the pool. I'm solving it now by passing the pool to Wallet constructor and calling watchWallet() on it as soon as possible.

chjj commented 8 years ago

Yeah, SPV wasn't given as much love as it should have been through all the recent refactoring. This is fixed on the #buffer-scripting branch. I'm going to be merging that into master soon along with some new docs.

chjj commented 8 years ago

Handled properly now via the save address event from the walletdb.