txscript: Rename calcSignatureHashRaw

This commit is contained in:
Conner Fromknecht 2019-04-19 19:07:18 -07:00 committed by Roy Lee
parent 9d1d6d59a6
commit b40859ff00
3 changed files with 7 additions and 7 deletions

View file

@ -2065,7 +2065,7 @@ func opcodeCheckSig(op *parsedOpcode, vm *Engine) error {
// to sign itself.
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())
@ -2334,7 +2334,7 @@ func opcodeCheckMultiSig(op *parsedOpcode, vm *Engine) error {
return err
}
} else {
hash = calcSignatureHashRaw(script, hashType, &vm.tx, vm.txIdx)
hash = calcSignatureHash(script, hashType, &vm.tx, vm.txIdx)
}
var valid bool

View file

@ -618,12 +618,12 @@ func CalcSignatureHash(script []byte, hashType SigHashType, tx *wire.MsgTx, idx
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
// the target transaction observing the desired signature hash type.
func calcSignatureHashRaw(sigScript []byte, hashType SigHashType, tx *wire.MsgTx, idx int) []byte {
// calcSignatureHash computes the signature hash for the specified input of the
// target transaction observing the desired signature hash type.
func calcSignatureHash(sigScript []byte, hashType SigHashType, tx *wire.MsgTx, idx int) []byte {
// The SigHashSingle signature type signs only the corresponding input
// and output (the output with the same index number as the input).
//

View file

@ -285,7 +285,7 @@ sigLoop:
// however, assume no sigs etc are in the script since that
// would make the transaction nonstandard and thus not
// 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 {
// All multisig addresses should be pubkey addresses