gofmt.
This commit is contained in:
parent
927d846f06
commit
118014a5b4
2 changed files with 9 additions and 9 deletions
12
script.go
12
script.go
|
@ -131,10 +131,10 @@ type ScriptClass byte
|
||||||
// Classes of script payment known about in the blockchain.
|
// Classes of script payment known about in the blockchain.
|
||||||
const (
|
const (
|
||||||
PubKeyTy ScriptClass = iota // Pay pubkey.
|
PubKeyTy ScriptClass = iota // Pay pubkey.
|
||||||
PubKeyHashTy // Pay pubkey hash.
|
PubKeyHashTy // Pay pubkey hash.
|
||||||
ScriptHashTy // Pay to script hash.
|
ScriptHashTy // Pay to script hash.
|
||||||
MultiSigTy // Multi signature.
|
MultiSigTy // Multi signature.
|
||||||
NonStandardTy // None of the above.
|
NonStandardTy // None of the above.
|
||||||
)
|
)
|
||||||
|
|
||||||
// Script is the virtual machine that executes btcscripts.
|
// Script is the virtual machine that executes btcscripts.
|
||||||
|
@ -309,7 +309,7 @@ func parseScriptTemplate(script []byte, opcodemap map[byte]*opcode) ([]parsedOpc
|
||||||
default:
|
default:
|
||||||
return retScript,
|
return retScript,
|
||||||
fmt.Errorf("invalid opcode length %d",
|
fmt.Errorf("invalid opcode length %d",
|
||||||
op.length)
|
op.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -787,7 +787,7 @@ func GetSigOpCount(script []byte) int {
|
||||||
// GetPreciseSigOpCount returns the number of signature operations in
|
// GetPreciseSigOpCount returns the number of signature operations in
|
||||||
// scriptPubKey. If bip16 is true then scriptSig may be searched for the
|
// scriptPubKey. If bip16 is true then scriptSig may be searched for the
|
||||||
// Pay-To-Script-Hash script in order to find the precise number of signature
|
// Pay-To-Script-Hash script in order to find the precise number of signature
|
||||||
// operations in the transaction. If the script fails to parse, then the
|
// operations in the transaction. If the script fails to parse, then the
|
||||||
// count up to the point of failure is returned.
|
// count up to the point of failure is returned.
|
||||||
func GetPreciseSigOpCount(scriptSig, scriptPubKey []byte, bip16 bool) int {
|
func GetPreciseSigOpCount(scriptSig, scriptPubKey []byte, bip16 bool) int {
|
||||||
// We don't check error since parseScript returns the parsed-up-to-error
|
// We don't check error since parseScript returns the parsed-up-to-error
|
||||||
|
|
|
@ -1075,9 +1075,9 @@ var txTests = []txTest{
|
||||||
0xba, 0x67,
|
0xba, 0x67,
|
||||||
btcscript.OP_EQUAL,
|
btcscript.OP_EQUAL,
|
||||||
},
|
},
|
||||||
idx: 0,
|
idx: 0,
|
||||||
err: btcscript.StackErrShortScript,
|
err: btcscript.StackErrShortScript,
|
||||||
bip16: true,
|
bip16: true,
|
||||||
},
|
},
|
||||||
txTest{
|
txTest{
|
||||||
// sigscript changed so to be non pushonly.
|
// sigscript changed so to be non pushonly.
|
||||||
|
|
Loading…
Add table
Reference in a new issue