Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.8-1 #72

Closed
wants to merge 5 commits into from
Closed

2.0.8-1 #72

wants to merge 5 commits into from

Conversation

MarcelusCH
Copy link
Member

@MarcelusCH MarcelusCH commented Oct 19, 2022

This commit should solve the issue #71

@MarcelusCH MarcelusCH changed the base branch from master to 2.0.8 October 19, 2022 21:17
@MarcelusCH MarcelusCH changed the title 2.0.8 1 2.0.8-1 Oct 19, 2022
@MarcelusCH
Copy link
Member Author

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 MarcelusCH marked this pull request as ready for review October 21, 2022 09:49
@MarcelusCH MarcelusCH linked an issue Oct 21, 2022 that may be closed by this pull request
@MarcelusCH
Copy link
Member Author

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.

struct CSpentIndexValue {

@MarcelusCH
Copy link
Member Author

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

@MarcelusCH
Copy link
Member Author

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
Copy link
Member Author

@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.

@MarkLTZ
Copy link
Contributor

MarkLTZ commented Jul 29, 2024

Replaced by #99

@MarkLTZ MarkLTZ closed this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug.log file Flooding (low impact)
2 participants