Z_gettotalbalance different to z_getbalance [solved]

Goodmorning!

Initial searches reveal a couple of posts which seem very similar to this, though they appear to be resolved when syncing properly with the blockchain. Forgive me if I have missed something and this question has been answered previously.

I’ve been mining some ZEC on a small scale over the past week or so, and up until today/yesterday everything has been very smooth in regard to the operation of zcash-cli and zcash. I managed to set up both a t-addr and z-addr, and have been able to succssfully transfer ZEC from my t-addr to my z-addr.

Yesterday I went to confirm my latest mininig payout with the ‘zcash-cli z_gettotalbalance’ command - the balance appeared as expected, matching my payouts from flypool.

I then went to transfer an ammount from my t-addr to my z-addr using the same commmand I had previously used successfully. This amount was, of course, less than the amount indicated by ‘z_gettotalbalance’. Upon issuing ‘z_getoperationresult’ it reported the transaction was declined due to insufficient funds.

After trying a few balance related commands, I realised that ‘z_gettotalbalance’ returns a transparent balance that is different to ‘z_getbalance $TADDR’.

I have tried restarting zcashd, restarting zcashd with ‘-rescan’, and restarting zashd with ‘-reindex’. After each of these actions completed, the issue was still present. I’m currently performing another ‘-reindex’.

I’m using the zcash debian ppa package detailed in the official ‘getting started’ guide on Ubuntu 15.10. My internet connection has dropped twice in the past 24hours (the previous 9 days have been fine), so I suspect this is related to the internet dropouts.

My question is - how do I fix this?

The balance of my t-addr when entered into a blockchain explorer is the same as ‘z_getbalance $TADDR’.

This balance does not match my flypool payouts, but ‘z_gettotalbalance’ does.

Typos:
*in regard to the operation of zcash-cli and zcashd
*mining payout
*transfer an amount.

For anyone who has the same problem, it turns out when I was transferring to my z-addr all the leftover in my t-addr was getting tranferred to another hidden t-addr (that I was able to send from, back to my known t-addr).

This hidden address can be found with the following command:

zcash-cli listaddressgroupings

Cheers

I had the same thing happen. Is there a way to stop this, and have the “residual” amount go back to the same t_addr instead of this other t_addr?

Thanx

No, it will only return to the sending address if you are sending from a Z_address to a Z_address. The T_address behavior you are observing is the “change” address inherited from Bitcoin.

See: Change - Bitcoin Wiki

1 Like

t-address change to sending address. · Issue #2675 · zcash/zcash · GitHub proposes to allow this, and possibly to make it the default. Also see this reply by @nathan-at-least to a similar question, explaining the context of the current behaviour.

Thanx you for the reply!

1 Like

Thanx you for the reply! I hope the change request is succesful.

1 Like