Skip to content

Commit 5ec73b8

Browse files
committed
Use 0 rather than OP_0 for the segwit version check
1 parent 921b068 commit 5ec73b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/script.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,14 @@ static bool scriptpubkey_is_p2sh(const unsigned char *bytes, size_t bytes_len)
205205
static bool scriptpubkey_is_p2wpkh(const unsigned char *bytes, size_t bytes_len)
206206
{
207207
return bytes_len == WALLY_SCRIPTPUBKEY_P2WPKH_LEN &&
208-
bytes[0] == OP_0 &&
208+
bytes[0] == 0 &&
209209
bytes[1] == 20;
210210
}
211211

212212
static bool scriptpubkey_is_p2wsh(const unsigned char *bytes, size_t bytes_len)
213213
{
214214
return bytes_len == WALLY_SCRIPTPUBKEY_P2WSH_LEN &&
215-
bytes[0] == OP_0 &&
215+
bytes[0] == 0 &&
216216
bytes[1] == 32;
217217
}
218218

0 commit comments

Comments
 (0)