Skip to content

Commit

Permalink
fixup: add switch stmt for P2SH-wrapped segwit input verification
Browse files Browse the repository at this point in the history
P2SH-wrapped inputs are segwit inputs and should be eligible for
spending, however the spec as written didn't permit them

Reported-by: @SomberNight
  • Loading branch information
niftynei committed Aug 3, 2022
1 parent fb48381 commit b4f0ef0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 02-peer-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ The receiving node:
(and not removed) input's
- `prevtx` is not a valid transaction
- `prevtx_vout` is greater or equal to the number of outputs on `prevtx`
- 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
- if the `script_sig` is provided:
- 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
- else:
- 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
followed by a single push of 2 to 40 bytes
- the `serial_id` is already included in the transaction
- the `serial_id` has the wrong parity
Expand Down

0 comments on commit b4f0ef0

Please sign in to comment.