Skip to content

Commit

Permalink
opmize format
Browse files Browse the repository at this point in the history
  • Loading branch information
wzy committed Jul 25, 2020
1 parent eba1ed9 commit f770760
Show file tree
Hide file tree
Showing 5 changed files with 1,275 additions and 1,275 deletions.
22 changes: 11 additions & 11 deletions tokenengine/internal/txscript/opcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,17 +405,17 @@ var opcodeArray = [256]opcode{
OP_16: {OP_16, "OP_16", 1, opcodeN},

// Control opcodes.
OP_NOP: {OP_NOP, "OP_NOP", 1, opcodeNop},
OP_VER: {OP_VER, "OP_VER", 1, opcodeReserved},
OP_IF: {OP_IF, "OP_IF", 1, opcodeIf},
OP_NOTIF: {OP_NOTIF, "OP_NOTIF", 1, opcodeNotIf},
OP_VERIF: {OP_VERIF, "OP_VERIF", 1, opcodeReserved},
OP_VERNOTIF: {OP_VERNOTIF, "OP_VERNOTIF", 1, opcodeReserved},
OP_ELSE: {OP_ELSE, "OP_ELSE", 1, opcodeElse},
OP_ENDIF: {OP_ENDIF, "OP_ENDIF", 1, opcodeEndif},
OP_VERIFY: {OP_VERIFY, "OP_VERIFY", 1, opcodeVerify},
OP_NOP: {OP_NOP, "OP_NOP", 1, opcodeNop},
OP_VER: {OP_VER, "OP_VER", 1, opcodeReserved},
OP_IF: {OP_IF, "OP_IF", 1, opcodeIf},
OP_NOTIF: {OP_NOTIF, "OP_NOTIF", 1, opcodeNotIf},
OP_VERIF: {OP_VERIF, "OP_VERIF", 1, opcodeReserved},
OP_VERNOTIF: {OP_VERNOTIF, "OP_VERNOTIF", 1, opcodeReserved},
OP_ELSE: {OP_ELSE, "OP_ELSE", 1, opcodeElse},
OP_ENDIF: {OP_ENDIF, "OP_ENDIF", 1, opcodeEndif},
OP_VERIFY: {OP_VERIFY, "OP_VERIFY", 1, opcodeVerify},
//OP_RETURN: {OP_RETURN, "OP_RETURN", 1, opcodeReturn},
OP_RETURN: {OP_RETURN, "OP_RETURN", 1, opcodeFalse},
OP_RETURN: {OP_RETURN, "OP_RETURN", 1, opcodeFalse},
OP_CHECKLOCKTIMEVERIFY: {OP_CHECKLOCKTIMEVERIFY, "OP_CHECKLOCKTIMEVERIFY", 1, opcodeCheckLockTimeVerify},

// Stack opcodes.
Expand Down Expand Up @@ -772,7 +772,7 @@ func (pop *parsedOpcode) bytes() ([]byte, error) {
if pop.opcode.length > 0 {
retbytes = make([]byte, 1, pop.opcode.length)
} else {
retbytes = make([]byte, 1, 1 + len(pop.data)-
retbytes = make([]byte, 1, 1+len(pop.data)-
pop.opcode.length)
}

Expand Down
2 changes: 1 addition & 1 deletion tokenengine/internal/txscript/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func calcSignatureHash(script []parsedOpcode, hashType SigHashType,
// calcSignatureHash will, given a script and hash type for the current script
// engine instance, calculate the signature hash to be used for signing and
// verification.
func calcSignatureData(script []parsedOpcode, hashType SigHashType, otx *modules.Transaction, omsgIdx, idx int) []byte {
func calcSignatureData(script []parsedOpcode, hashType SigHashType, otx *modules.Transaction, omsgIdx, idx int) []byte {
tx := otx
msgIdx := omsgIdx
if hashType&SigHashOneMessage == SigHashOneMessage {
Expand Down
Loading

0 comments on commit f770760

Please sign in to comment.