Skip to content

Commit

Permalink
txscript: Remove unused removeOpcode
Browse files Browse the repository at this point in the history
  • Loading branch information
cfromknecht committed Feb 5, 2021
1 parent 897c0ec commit 3337741
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions txscript/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,20 +267,6 @@ func DisasmString(script []byte) (string, error) {
return disbuf.String(), tokenizer.Err()
}

// removeOpcode will remove any opcode matching ``opcode'' from the opcode
// stream in pkscript
//
// DEPRECATED. Use removeOpcodeRaw instead.
func removeOpcode(pkscript []parsedOpcode, opcode byte) []parsedOpcode {
retScript := make([]parsedOpcode, 0, len(pkscript))
for _, pop := range pkscript {
if pop.opcode.value != opcode {
retScript = append(retScript, pop)
}
}
return retScript
}

// removeOpcodeRaw will return the script after removing any opcodes that match
// `opcode`. If the opcode does not appear in script, the original script will
// be returned unmodified. Otherwise, a new script will be allocated to contain
Expand Down

0 comments on commit 3337741

Please sign in to comment.