Post
Topic
Board Announcements (Altcoins)
Re: Official Anoncoin chat thread (including history)
by
Gnosis-
on 27/10/2014, 06:07:38 UTC
Anoncoin rpcwallet.cpp is broken.That is a probable cause of wallet erratic behaviour.Error in code for wallet tx - JSON connection :

Line 41 - if (confirms) should be if (confirms > 0)

No, sorry, that's not a bug. Perhaps it's not good coding style, but it's not a bug.

It could only be a bug if confirms could ever be less than 0, which is impossible, as you can see from CMerkleTx::GetDepthInMainChain (main.cpp lines 898-921).

Keep looking. Smiley

EDIT: You may have noticed this by comparing with the Bitcoin code, where it says (confirms > 0). This was changed in February at the same time that CMerkleTx::GetDepthInMainChain was modified to return -1 in the case of a "conflicting transaction." Anoncoin's code does not need this check because our version of said function never returns a negative value.