Use OP_0 to better mimic bitcoin core code
Our `Builder::push_int` method is the same as Bitcoin Core `CScript` `push_int64` method. We currently use `OP_FALSE` (equivalent to `OP_0`) but recently we added `OP_0`, lets use it to make our code better mimic Core (also saves devs checking that `OP_FALSE` is the same as `OP_0`).
This commit is contained in:
parent
31d254a6a8
commit
657dd51e8b
|
@ -42,7 +42,7 @@ impl Builder {
|
|||
}
|
||||
// We can also special-case zero
|
||||
else if data == 0 {
|
||||
self.push_opcode(opcodes::OP_FALSE)
|
||||
self.push_opcode(opcodes::OP_0)
|
||||
}
|
||||
// Otherwise encode it as data
|
||||
else { self.push_int_non_minimal(data) }
|
||||
|
|
Loading…
Reference in New Issue