WIP: next hard fork #5
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue