Skip to content

balance wrong after unloading wallet and loading it again #15591

@benwilliams

Description

@benwilliams

Have two wallets used by this instance of bitcoind. The default wallet has balance 0.02861762.
Initially reported balance is correct but after unloading the wallet and then loading it again, the balance is wrong. Neither of the wallets have the reported balance.

I expected the balance to be the same as initially reported.

btc@ubuntu:~$ bitcoin-cli  -getinfo
{
  "version": 170100,
  "protocolversion": 70015,
  "walletversion": 159900,
  "balance": 0.02861762,
...

btc@ubuntu:~$ bitcoin-cli  loadwallet wallet2
btc@ubuntu:~$ bitcoin-cli unloadwallet ""
btc@ubuntu:~$ bitcoin-cli loadwallet ""
btc@ubuntu:~$ bitcoin-cli unloadwallet wallet2
btc@ubuntu:~$ bitcoin-cli  -getinfo
{
  "version": 170100,
  "protocolversion": 70015,
  "walletversion": 159900,
  "balance": 0.01012607,
...

The balance 0.01012607 is wrong and I have no idea where that number came from.
Restarting the process results in correct balance again.

ubuntu package for bionic

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions