txscript: Remove unused isSStxChange function.

This commit is contained in:
Dave Collins 2019-03-13 01:12:04 -05:00
parent 89d4941164
commit 28765fa2f1
No known key found for this signature in database
GPG Key ID: B8904D9D9C93D1F2

View File

@ -556,30 +556,6 @@ func isStakeRevocationScript(scriptVersion uint16, script []byte) bool {
extractStakeScriptHash(script, stakeOpcode) != nil
}
// isSStxChange returns true if the script passed is a stake submission
// change tx, false otherwise.
func isSStxChange(pops []parsedOpcode) bool {
if len(pops) == 6 &&
pops[0].opcode.value == OP_SSTXCHANGE &&
pops[1].opcode.value == OP_DUP &&
pops[2].opcode.value == OP_HASH160 &&
pops[3].opcode.value == OP_DATA_20 &&
pops[4].opcode.value == OP_EQUALVERIFY &&
pops[5].opcode.value == OP_CHECKSIG {
return true
}
if len(pops) == 4 &&
pops[0].opcode.value == OP_SSTXCHANGE &&
pops[1].opcode.value == OP_HASH160 &&
pops[2].opcode.value == OP_DATA_20 &&
pops[3].opcode.value == OP_EQUAL {
return true
}
return false
}
// isStakeChangeScript returns whether or not the passed script is a supported
// stake change script.
//