WIP: next hard fork #5

Draft
BrannonKing wants to merge 178 commits from WIP-HF-2022 into master
Showing only changes of commit 847a262d78 - Show all commits

View file

@ -355,6 +355,7 @@ func extractWitnessPubKeyHash(script []byte) []byte {
return script[2:22] return script[2:22]
} }
return nil return nil
} }
@ -438,6 +439,8 @@ func typeOfScript(scriptVersion uint16, script []byte) ScriptClass {
return PubKeyHashTy return PubKeyHashTy
case isScriptHashScript(script): case isScriptHashScript(script):
return ScriptHashTy return ScriptHashTy
case isWitnessPubKeyHashScript(script):
return WitnessV0PubKeyHashTy
case isMultisigScript(scriptVersion, script): case isMultisigScript(scriptVersion, script):
return MultiSigTy return MultiSigTy
case isNullDataScript(scriptVersion, script): case isNullDataScript(scriptVersion, script):
@ -449,9 +452,7 @@ func typeOfScript(scriptVersion uint16, script []byte) ScriptClass {
return NonStandardTy return NonStandardTy
} }
if isWitnessPubKeyHash(pops) { if isWitnessScriptHash(pops) {
return WitnessV0PubKeyHashTy
} else if isWitnessScriptHash(pops) {
return WitnessV0ScriptHashTy return WitnessV0ScriptHashTy
} }