Author

Topic: Is it bug with Bitcoin Core? Cannot transfer using sendtoaddress (Read 214 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
How to restore the state of the wallet in the case?

abandontransaction works 50%/50%

rescan does not help...
You can start Bitcoin Core with -zapwallettxes. That will remove all transactions from your wallet and rescan.
newbie
Activity: 4
Merit: 0
How to restore the state of the wallet in the case?

abandontransaction works 50%/50%

rescan does not help...
newbie
Activity: 4
Merit: 0
Thank you! It seams to me the problem with listunspent also.

I've got the balance back by abandontransaction command.

staff
Activity: 3458
Merit: 6793
Just writing some code
This is a known problem with the accounts system used by Bitcoin Core which is being removed.

Calling getbalance with no arguments vs calling getbalance with arguments actually uses different algorithms for calculating the balance. I would say that with no arguments (so bitcoin-cli getbalance) is more correct than with specifying an account. It should, under normal circumstances, give you the full balance of the wallet. It uses the same function that is used for checking whether the wallet has enough funds for sending too, which is why you see an error when trying to use sendtoaddress.

There have been several issues and pull requests discussing the strange behavior of getbalance.
newbie
Activity: 4
Merit: 0
I happend after the transaction is made between addresses at the same wallet using bitcoin-cli sendtoaddress...
The result of getbalance command became 0.00000000
newbie
Activity: 4
Merit: 0
$ bitcoin-cli getbalance ""
1.90993320

------------------------------------

$ bitcoin-cli getbalance
0.00000000

------------------------------------

$ bitcoin-cli listunspent
[
]

------------------------------------

$ bitcoin-cli listaccounts
{
  "": 1.90993320,
  "acc1": 0.00000000,
  "acc2": 0.00000000,
  "acc3": 0.00000000,
  "acc4": 0.00000000,
  "acc5": 0.00000000
}

------------------------------------

bitcoin-cli sendtoaddress 2MvhWof9bB2Vjh5WYDkT8YrbzSodoTYjGto 1
error code: -6
error message:
Insufficient funds






Jump to: