Skip to content

Commit b4f0ef0

Browse files
committed
fixup: add switch stmt for P2SH-wrapped segwit input verification
P2SH-wrapped inputs are segwit inputs and should be eligible for spending, however the spec as written didn't permit them Reported-by: @SomberNight
1 parent fb48381 commit b4f0ef0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

02-peer-protocol.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@ The receiving node:
216216
(and not removed) input's
217217
- `prevtx` is not a valid transaction
218218
- `prevtx_vout` is greater or equal to the number of outputs on `prevtx`
219-
- the `scriptPubKey` of the `prevtx_out` output of `prevtx` is not exactly a 1-byte push opcode (for the numeric values 0 to 16) followed by a data push between 2 and 40 bytes
219+
- if the `script_sig` is provided:
220+
- and it is not exactly a 1-byte push opcode (for the numeric values `0` to `16`) followed by a data push between 2 and 40 bytes OR
221+
- else:
222+
- the `scriptPubKey` of the `prevtx_out` output of `prevtx` is not exactly a 1-byte push opcode (for the numeric values 0 to 16) followed by a data push between 2 and 40 bytes
220223
followed by a single push of 2 to 40 bytes
221224
- the `serial_id` is already included in the transaction
222225
- the `serial_id` has the wrong parity

0 commit comments

Comments
 (0)