diff --git a/fetch/wire_types.go b/fetch/wire_types.go index d27455472a..70e8b1de95 100644 --- a/fetch/wire_types.go +++ b/fetch/wire_types.go @@ -22,7 +22,7 @@ type RequestMessage struct { // ResponseMessage is sent to the node as a response. type ResponseMessage struct { Hash types.Hash32 - Data []byte `scale:"max=20971520"` // limit to 20 MiB + Data []byte `scale:"max=41943040"` // limit to 40 MiB } // RequestBatch is a batch of requests and a hash of all requests as ID. diff --git a/fetch/wire_types_scale.go b/fetch/wire_types_scale.go index 939fe94026..6e81e111d8 100644 --- a/fetch/wire_types_scale.go +++ b/fetch/wire_types_scale.go @@ -55,7 +55,7 @@ func (t *ResponseMessage) EncodeScale(enc *scale.Encoder) (total int, err error) total += n } { - n, err := scale.EncodeByteSliceWithLimit(enc, t.Data, 20971520) + n, err := scale.EncodeByteSliceWithLimit(enc, t.Data, 41943040) if err != nil { return total, err } @@ -73,7 +73,7 @@ func (t *ResponseMessage) DecodeScale(dec *scale.Decoder) (total int, err error) total += n } { - field, n, err := scale.DecodeByteSliceWithLimit(dec, 20971520) + field, n, err := scale.DecodeByteSliceWithLimit(dec, 41943040) if err != nil { return total, err }