mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-24 22:58:38 +01:00
Make removeOpcodeByData in line with bitcoind behaviour.
It should remove the opcode and data is the data is contained within the data pushed, not just if it is equal to it. Found by bitcoind tx tests.
This commit is contained in:
parent
dab2a7cb0f
commit
76339baf6c
1 changed files with 1 additions and 1 deletions
|
@ -754,7 +754,7 @@ func removeOpcode(pkscript []parsedOpcode, opcode byte) []parsedOpcode {
|
|||
func removeOpcodeByData(pkscript []parsedOpcode, data []byte) []parsedOpcode {
|
||||
retScript := make([]parsedOpcode, 0, len(pkscript))
|
||||
for _, pop := range pkscript {
|
||||
if !bytes.Equal(pop.data, data) {
|
||||
if !bytes.Contains(pop.data, data) {
|
||||
retScript = append(retScript, pop)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue