|
Title: Is it bug with Bitcoin Core? Cannot transfer using sendtoaddress Post by: Advansist on July 11, 2018, 08:45:53 PM $ 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 Title: Re: Is it bug with Bitcoin Core? Cannot transfer using sendtoaddress Post by: Advansist on July 11, 2018, 08:59:03 PM 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 Title: Re: Is it bug with Bitcoin Core? Cannot transfer using sendtoaddress Post by: achow101 on July 11, 2018, 10:25:27 PM 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 (https://github.com/bitcoin/bitcoin/issues?utf8=%E2%9C%93&q=getbalance) discussing the strange behavior of getbalance. Title: Re: Is it bug with Bitcoin Core? Cannot transfer using sendtoaddress Post by: Advansist on July 11, 2018, 10:46:50 PM Thank you! It seams to me the problem with listunspent also.
I've got the balance back by abandontransaction command. Title: Re: Is it bug with Bitcoin Core? Cannot transfer using sendtoaddress Post by: Advansist on July 13, 2018, 12:25:03 PM How to restore the state of the wallet in the case?
abandontransaction works 50%/50% rescan does not help... Title: Re: Is it bug with Bitcoin Core? Cannot transfer using sendtoaddress Post by: achow101 on July 13, 2018, 06:49:47 PM How to restore the state of the wallet in the case? You can start Bitcoin Core with -zapwallettxes. That will remove all transactions from your wallet and rescan.abandontransaction works 50%/50% rescan does not help... |