SatoshiPortal / cyphernode

Modular Bitcoin full-node microservices API server architecture and utilities toolkit to build scalable, secure and featureful apps and services without trusted third parties
MIT License
362 stars 68 forks source link

Watched spending: don't import to watching wallet #312

Open Kexkey opened 8 months ago

Kexkey commented 8 months ago

We don't need to import an address from the spending wallet to the watching wallet to be able to watch it; every address of the node's wallets will trigger a walletnotify action.

Currently we systematically import a watched address to the watching wallet even if it's a spending address, so we have a lot of addresses in both wallets for no gains.

phillamy commented 8 months ago

Added optional callback urls to getnewaddress so CN can add a watch in a single call. The clients won't have to call getnewaddress followed by a watch request of this newaddress anymore

Kexkey commented 3 months ago

Did you also remove the importaddress to the watching wallet when trying to watch a spending wallet address?

phillamy commented 3 months ago

Can't find those changes locally. Maybe changed my mind also : let the caller do the 2 calls and wrap those 2 calls into something called watchNewBitcoinAddress