Account has insufficient funds

Hi guys,

Wondering if someone can help me understand what i’m doing wrong here. For my game I have a ‘hot wallet’ in which players can auto withdraw funds. I keep a smaller amount in the hot wallet for security reasons. If a player wants to make a larger withdraw I do it manually. In this case a player wanted to withdraw 25ZEC. The hot wallet was a little shy of that amount so I quickly sent 16 coins over from another wallet. The hot wallet shows the new coins and at the time I could see 3 confirmations on the blockchain from that transaction. However, when I go to send 25ZEC from the hot wallet it won’t let me. See below:

nekoz@abcdef:~ zcash-cli getbalance 33.63120186 nekoz@abcdef:~ zcash-cli getunconfirmedbalance
nekoz@abcdef:~$ zcash-cli sendmany “” “{"tasdfasdfasdfasdfasdfasdf":25.00}”
error code: -6
error message:
Account has insufficient funds

Seems like maybe I need to wait for more confirmations but wanted to see if anyone had any insights.




Thanks. Was in a hurry and wasn’t sure. With more time to research I found these:

“Use a minconf of 10 (minimum number of confirmations) to defend against potential blockchain reorganizations (note: we may increase this number if ongoing research reveals notable risks).”

"Let’s just say 6 transactions (15 minutes). "

Ran into this issue again a year later and this post was the first google result I found while trying to resolve it :joy:

Because the issue wasn’t related to confirmations I figured i’d give a quick update in case anyone runs into it in the future.

If you import a private key like this:

./zcash-cli importprivkey Lzzzzzbbbbbbbasdfasdfasdfasdf 'blah' true

and then try to send coins (using sendmany) you will get the error:

error code: -6
error message:
Account has insufficient funds

This is apparently because the account feature has been depreciated (in BTC core and Zcash) and sendmany only works with empty account names. So if you import keys like this:

./zcash-cli importprivkey Lzzzzzbbbbbbbasdfasdfasdfasdf '' true

Then you can use sendmany to send coins like this:

./zcash-cli sendmany “” "{“tasdfasdfasdfasdfasdfasdf”:25.00}"

Hope this saves someone some searching down the road :grin:

Also, fwiw, i’m running zcash v1.1.2