Skip to content

Commit 6a03eb3

Browse files
committedNov 1, 2022
wire: increase max witness items per input
1 parent 2cc1908 commit 6a03eb3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎wire/msgtx.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,13 @@ const (
9696

9797
// maxWitnessItemsPerInput is the maximum number of witness items to
9898
// be read for the witness data for a single TxIn. This number is
99-
// derived using a possble lower bound for the encoding of a witness
99+
// derived using a possible lower bound for the encoding of a witness
100100
// item: 1 byte for length + 1 byte for the witness item itself, or two
101101
// bytes. This value is then divided by the currently allowed maximum
102-
// "cost" for a transaction.
103-
maxWitnessItemsPerInput = 500000
102+
// "cost" for a transaction. We use this for an upper bound for the
103+
// buffer and consensus makes sure that the weight of a transaction
104+
// cannot be more than 4000000.
105+
maxWitnessItemsPerInput = 4_000_000
104106

105107
// maxWitnessItemSize is the maximum allowed size for an item within
106108
// an input's witness data. This value is bounded by the largest

0 commit comments

Comments
 (0)
Please sign in to comment.