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.
0btc@ubuntu:~$ bitcoin-cli -getinfo
1{
2 "version": 170100,
3 "protocolversion": 70015,
4 "walletversion": 159900,
5 "balance": 0.02861762,
6...
7
8btc@ubuntu:~$ bitcoin-cli loadwallet wallet2
9btc@ubuntu:~$ bitcoin-cli unloadwallet ""
10btc@ubuntu:~$ bitcoin-cli loadwallet ""
11btc@ubuntu:~$ bitcoin-cli unloadwallet wallet2
12btc@ubuntu:~$ bitcoin-cli -getinfo
13{
14 "version": 170100,
15 "protocolversion": 70015,
16 "walletversion": 159900,
17 "balance": 0.01012607,
18...
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