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

blockchain: Ensure no stake opcodes in tx sanity. #1453

Merged

Commits on Sep 14, 2018

  1. blockchain: Ensure no stake opcodes in tx sanity.

    This moves the check for validating that output scripts in non-stake
    transactions do not contain any of the opcodes only allowed in the stake
    tree to the CheckTransactionSanity function where it more naturally
    belongs since it does not require access to transaction inputs as its
    location in CheckTransactionInputs would otherwise indicate.
    
    It should be noted that the check just before the one being moved in
    this change is removed because it checked that specific patterns
    involving stake opcodes where not being used in non-stake transactions
    which is a strict subset of the more general check which ensures there
    are no stake opcodes at all in the output scripts.
    
    Also, to improve efficiency, the check is added to the existing loop
    which already iterates the outputs and the entire block is moved after
    some other faster checks.
    
    Finally, since the transaction sanity code previously did not determine
    if the transaction is a stake transaction which is required for the
    check in question, this adds code to relatively efficiently determine
    that.
    davecgh committed Sep 14, 2018
    Configuration menu
    Copy the full SHA
    37315c0 View commit details
    Browse the repository at this point in the history