txscript: Rename calcSignatureHashRaw
This commit is contained in:
parent
911db90858
commit
94e99cf6b7
3 changed files with 7 additions and 7 deletions
|
@ -2065,7 +2065,7 @@ func opcodeCheckSig(op *parsedOpcode, vm *Engine) error {
|
||||||
// to sign itself.
|
// to sign itself.
|
||||||
subScript = removeOpcodeByData(subScript, fullSigBytes)
|
subScript = removeOpcodeByData(subScript, fullSigBytes)
|
||||||
|
|
||||||
hash = calcSignatureHashRaw(subScript, hashType, &vm.tx, vm.txIdx)
|
hash = calcSignatureHash(subScript, hashType, &vm.tx, vm.txIdx)
|
||||||
}
|
}
|
||||||
|
|
||||||
pubKey, err := btcec.ParsePubKey(pkBytes, btcec.S256())
|
pubKey, err := btcec.ParsePubKey(pkBytes, btcec.S256())
|
||||||
|
@ -2334,7 +2334,7 @@ func opcodeCheckMultiSig(op *parsedOpcode, vm *Engine) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hash = calcSignatureHashRaw(script, hashType, &vm.tx, vm.txIdx)
|
hash = calcSignatureHash(script, hashType, &vm.tx, vm.txIdx)
|
||||||
}
|
}
|
||||||
|
|
||||||
var valid bool
|
var valid bool
|
||||||
|
|
|
@ -618,12 +618,12 @@ func CalcSignatureHash(script []byte, hashType SigHashType, tx *wire.MsgTx, idx
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return calcSignatureHashRaw(script, hashType, tx, idx), nil
|
return calcSignatureHash(script, hashType, tx, idx), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// calcSignatureHashRaw computes the signature hash for the specified input of
|
// calcSignatureHash computes the signature hash for the specified input of the
|
||||||
// the target transaction observing the desired signature hash type.
|
// target transaction observing the desired signature hash type.
|
||||||
func calcSignatureHashRaw(sigScript []byte, hashType SigHashType, tx *wire.MsgTx, idx int) []byte {
|
func calcSignatureHash(sigScript []byte, hashType SigHashType, tx *wire.MsgTx, idx int) []byte {
|
||||||
// The SigHashSingle signature type signs only the corresponding input
|
// The SigHashSingle signature type signs only the corresponding input
|
||||||
// and output (the output with the same index number as the input).
|
// and output (the output with the same index number as the input).
|
||||||
//
|
//
|
||||||
|
|
|
@ -285,7 +285,7 @@ sigLoop:
|
||||||
// however, assume no sigs etc are in the script since that
|
// however, assume no sigs etc are in the script since that
|
||||||
// would make the transaction nonstandard and thus not
|
// would make the transaction nonstandard and thus not
|
||||||
// MultiSigTy, so we just need to hash the full thing.
|
// MultiSigTy, so we just need to hash the full thing.
|
||||||
hash := calcSignatureHashRaw(pkScript, hashType, tx, idx)
|
hash := calcSignatureHash(pkScript, hashType, tx, idx)
|
||||||
|
|
||||||
for _, addr := range addresses {
|
for _, addr := range addresses {
|
||||||
// All multisig addresses should be pubkey addresses
|
// All multisig addresses should be pubkey addresses
|
||||||
|
|
Loading…
Reference in a new issue