Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getinfo balance calculation error #228

Open
Mullick opened this issue Aug 22, 2015 · 2 comments
Open

getinfo balance calculation error #228

Mullick opened this issue Aug 22, 2015 · 2 comments

Comments

@Mullick
Copy link

Mullick commented Aug 22, 2015

I was trying to spend some inputs today when I ran into an interesting issue.

error: {"code":-4,"message":"Error: Transaction creation failed "}

Usually I get that error due to dust inputs creating to large of a transaction. So I checked

novacoind listunspent | grep amount
"amount" : 7.05400000,
"amount" : 7.05100000,
"amount" : 6.99100000,
"amount" : 7.04000000,
"amount" : 6.99000000,
"amount" : 7.03000000,
"amount" : 7.02000000,
"amount" : 7.04100000,
"amount" : 7.03000000,
"amount" : 7.05000000,
"amount" : 6.99000000,
"amount" : 6.99000000,
"amount" : 6.99000000,
"amount" : 7.05100100,
"amount" : 7.02000000,
"amount" : 7.02000000,

So only 16 unspent inputs. Which should fit into a transaction just fine. I ended up sending in multiple transactions until I got down to 0.099 NVC according to getinfo. Now it seems I have an unspendable input

novacoind getinfo
{
"version" : "nvc-v0.5.2.build-g32a928e-bdb",
"protocolversion" : 60016,
"walletversion" : 60000,
"balance" : 0.09900000,
"unspendable" : 0.00000000,
"newmint" : 147.64200100,
"stake" : 0.00000000,
"blocks" : 197491,
"timeoffset" : 0,
"moneysupply" : 1249786.88352300,
"connections" : 15,
"proxy" : "",
"ip" : "",
"difficulty" : {
"proof-of-work" : 2112.65544482,
"proof-of-stake" : 1.73846725
},
"testnet" : false,
"keypoololdest" : 1438069853,
"keypoolsize" : 101,
"paytxfee" : 0.00100000,
"mininput" : 0.00100000,
"errors" : ""
}

But that is not the balance of my unspent inputs

novacoind listunspent 0 | grep amount
"amount" : 0.09899900,

So when trying to spend this input I get nowhere

:$ novacoind sendtoaddress REMOVEDFORPRIVACY 0.989
error: {"code":-4,"message":"Insufficient funds"}
:
$ novacoind sendtoaddress REMOVEDFORPRIVACY 0.0989
error: {"code":-4,"message":"Insufficient funds"}
:$ novacoind sendtoaddress REMOVEDFORPRIVACY 0.0988
error: {"code":-4,"message":"Insufficient funds"}
:
$ novacoind sendtoaddress REMOVEDFORPRIVACY 0.0987
error: {"code":-4,"message":"Insufficient funds"}
:$ novacoind sendtoaddress REMOVEDFORPRIVACY 0.0986
error: {"code":-4,"message":"Insufficient funds"}
:
$ novacoind sendtoaddress REMOVEDFORPRIVACY 0.0985
error: {"code":-4,"message":"Insufficient funds"}
:$ novacoind sendtoaddress REMOVEDFORPRIVACY 0.0984
error: {"code":-4,"message":"Insufficient funds"}
:
$ novacoind sendtoaddress REMOVEDFORPRIVACY 0.098
error: {"code":-4,"message":"Error: Transaction creation failed "}

I havent even tried a repair wallet or rescan which ill be doing now. But I have never seen an issue quite like this before. Ill update if that fixes the issue

Edit Repair wallet and a rescan had no effect

Looks like I built from the master branch on Aug 21 19:57

@Mullick Mullick changed the title getinfo balance calculation erro getinfo balance calculation error Aug 22, 2015
@CryptoManiac
Copy link
Contributor

Repairwallet is purposed to sync the wallet state with the network. It would help if you are using some old copy of wallet.dat, which is not the case I guess.

In case if you will get the same issue in the future, would it be possible to get a copy of your wallet.dat for debugging? Of course I'm ready to pay a compensation in exchange for wallet. :)

@Mullick
Copy link
Author

Mullick commented Aug 23, 2015

Thanks for the help balthazar

It seems to have popped up again. I think the issue is when i mine these blocks with 100 satoshi at the end.

novacoind listunspent
[
{
"txid" : "87929428cab5fb70f1d3831c850768e32992a56635531848ce41c44b82b534b8",
"vout" : 0,
"address" : "4PQmYm6rRKSKvCivxUbgkgMuFwo1wTqhop",
"scriptPubKey" : "76a9146a77683e31ee48b62984aa690bedd6c7dc389bd288ac",
"amount" : 0.33000000,
"confirmations" : 209,
"spendable" : true
},
{
"txid" : "bb6f1aae15d3521326f87ff364b04b30e8f7e06b5e2f0da9b18249a09d78398c",
"vout" : 0,
"address" : "4Rx3QU3aCYBE2WB9V3kXFqtHMtuk161ioa",
"scriptPubKey" : "76a9148651ca5395f30c5e88c43cc10b43ae444c25a92088ac",
"amount" : 0.33900000,
"confirmations" : 1,
"spendable" : true
}
]

"balance" : 0.66900100,

An example of the blocks im talking about

{
"account" : "",
"category" : "immature",
"amount" : 6.97000100,
"confirmations" : 378,
"generated" : true,
"blockhash" : "0000000000183f712d4ca04157a4e76e291601d4f21285ef407553f3b59c7171",
"blockindex" : 0,
"blocktime" : 1440197690,
"txid" : "e044bf11b1050c6ac162390ee69b1c2727748bcafce7c52ff7ec041f5dc8145b",
"time" : 1440197688,
"timereceived" : 1440197699
},

I have some immature blocks in the wallet. Ill swap over to another for mining and once those are mature ill send you over the wallet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants