bitcoinz icon indicating copy to clipboard operation
bitcoinz copied to clipboard

2.0.8-1

Open MarcelusCH opened this issue 2 years ago • 5 comments

This commit should solve the issue https://github.com/btcz/bitcoinz/issues/71

MarcelusCH avatar Oct 19 '22 21:10 MarcelusCH

In the wallet class make a test to know if it's an TX_NULL_DATA. In the main class make a test to know if outputValue is zero (0) so no spent info possible.

MarcelusCH avatar Oct 21 '22 09:10 MarcelusCH

Finally I decided to verify about a zero value. But maybe it is more clean the check in the CSpentIndexValue structure about the addressType instead of satoshis.

https://github.com/btcz/bitcoinz/blob/8e85a88dfaa4eb80a70a5c90c17e92381665a06f/src/spentindex.h#L39

MarcelusCH avatar Oct 23 '22 16:10 MarcelusCH

Just updated the changes log and the versioning to 2.0.8-1 This node is actually ruining on https://explorer.btcz.app

MarcelusCH avatar Nov 06 '22 14:11 MarcelusCH

By verifying if the spent index exist in the block tree, I modified the return error to only if it's an valid address. I guess it's the best way to still get back the error (that should never happen) without trigger the OP_RETURN code. Not necessary to check for more and it also avoid a false return !

    // In either case, we need to get more info ...
    if (!pblocktree->ReadSpentIndex(key, value)) {

      // Check if its an OP_RETURN code. GITHUB ISSUE #71
      // Only return error if it's a valid address
      CTxDestination dest = DestFromAddressHash(value.addressType, value.addressHash);
      if (IsValidDestination(dest)) {
        return error("Unable to get spent index information");
      }
    }

MarcelusCH avatar Dec 03 '22 12:12 MarcelusCH

@cryptorex we could take this base for deprecation update. I tested it on FN wallet, BWS and explorer. But not on mining nodes... will check in mining-pool channel if someone is ready to test it.

MarcelusCH avatar Aug 01 '23 06:08 MarcelusCH

Replaced by #99

MarkLTZ avatar Jul 29 '24 17:07 MarkLTZ