Tiny balance update bug after importprivkey #640

issue hebasto openend this issue on August 5, 2022
  1. hebasto commented at 9:27 am on August 5, 2022: member

    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):

    1. generate 101
    2. getnewaddress, store somewhere
    3. sendtoaddress <addr-from-2> 10
    4. dumpprivkey <addr-from-2>, store somewhere
    5. Stop node
    6. Remove wallet.dat
    7. Start node
    8. importaddress <addr-from-2> (== triggers rescan) watch only balance should list properly
    9. importprivkey "<WIF-key-from-4>" "test" false will lead to available balance of 0 (but should be 10)

    A restart solves the issue.

    Bitcoind (listtransactions, getbalance, etc.) is not affected.

    Moved from bitcoin/bitcoin#11477.

  2. hebasto added the label Bug on Aug 5, 2022
  3. hebasto added the label Wallet on Aug 5, 2022


hebasto

Labels
Bug Wallet


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 07:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me