Skip to content

Commit

Permalink
txscript/script: remove unused removeOpcode
Browse files Browse the repository at this point in the history
  • Loading branch information
cfromknecht committed Feb 2, 2021
1 parent 8d42653 commit 85eb436
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 @@ -256,20 +256,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 85eb436

Please sign in to comment.