When using bitcoinilb's HDWallet implementation with bitcoind, I've realized that I was forced firstly register the addresses I was interested in, otherwise it'll return an error.
For the sake of completeness, here's the code:
def update() -> None:
addresses = wallet.addresslist(account_id=0)
registered_addresses = set(map(lambda a: a['address'],
bitcoind_execute('listreceivedbyaddress', params=[0, True, True])))
addresses_to_update = filter(lambda a: a not in registered_addresses, addresses)
for address in addresses_to_update:
bitcoind_execute('importaddress', params=[address, '', False])
wallet.utxos_update(account_id=0, networks=[wallet.network.name])
As you can see, if I wouldn't call the importaddress bitcoind method it wouldn't work. Furthermore, if I wouldn't call the listreceivedbyaddress method I'd be calling more times than needed to my bitcoind node. Is this the expected behaviour, or am I missing something?
When using bitcoinilb's HDWallet implementation with bitcoind, I've realized that I was forced firstly register the addresses I was interested in, otherwise it'll return an error.
For the sake of completeness, here's the code:
As you can see, if I wouldn't call the
importaddress
bitcoind method it wouldn't work. Furthermore, if I wouldn't call thelistreceivedbyaddress
method I'd be calling more times than needed to my bitcoind node. Is this the expected behaviour, or am I missing something?