Skip to content

Commit acb7313

Browse files
authored
Merge pull request #1907 from ellemouton/bumpWithnessItemPerInputMax
wire: increase max witness items per input
2 parents 2cc1908 + 6a03eb3 commit acb7313

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

wire/msgtx.go

Lines changed: 5 additions & 3 deletions
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)