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