Merge pull request #506 from paritytech/fix_witness_commitment

Fix witness commitment size check
This commit is contained in:
Marek Kotewicz 2018-05-11 10:03:57 +02:00 committed by GitHub
commit c30560e7b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -575,7 +575,7 @@ pub type ScriptWitness = Vec<Bytes>;
/// Passed bytes array is a commitment script?
/// https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#Commitment_structure
pub fn is_witness_commitment_script(script: &[u8]) -> bool {
script.len() >= 36 &&
script.len() >= 38 &&
script[0] == Opcode::OP_RETURN as u8 &&
script[1] == 0x24 &&
script[2] == 0xAA &&