If you import a private key of an address you are already watching and without a rescan, the available balance does not upgrade correctly.
Steps (regtest):
generate 101getnewaddress, store somewheresendtoaddress <addr-from-2> 10dumpprivkey <addr-from-2>, store somewhere- Stop node
- Remove wallet.dat
- Start node
importaddress <addr-from-2>(== triggers rescan) watch only balance should list properlyimportprivkey "<WIF-key-from-4>" "test" falsewill lead to available balance of 0 (but should be 10)
A restart solves the issue.
Bitcoind (listtransactions, getbalance, etc.) is not affected.