Skip to content

Commit

Permalink
fixup: include specifier for how elements -> witness_data
Browse files Browse the repository at this point in the history
Clarify how witness data gets packed for plebs like me
  • Loading branch information
niftynei committed Jul 7, 2023
1 parent 091397f commit e299850
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 02-peer-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ This prevents deadlocks where each peer is waiting for the other peer to
send `tx_signatures`, and enables multiparty tx collaboration.

The `witness_data` is encoded as per bitcoin's wire protocol (a CompactSize number
of elements, with each element a CompactSize length and that many bytes following).
of elements, with each element a CompactSize length and that many bytes following.)
Each `witness_data` field contains all of the witness elements for a single input,
including the leading counter of elements.

While the `minimum fee` is calculated and verified at `tx_complete` conclusion,
it is possible for the fee for the exchanged witness data to be underpaid.
Expand Down

0 comments on commit e299850

Please sign in to comment.