bitcoinz
bitcoinz copied to clipboard
2.0.8-1
This commit should solve the issue https://github.com/btcz/bitcoinz/issues/71
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.
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
Just updated the changes log and the versioning to 2.0.8-1 This node is actually ruining on https://explorer.btcz.app
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");
}
}
@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.
Replaced by #99