From aa6413622ef12ee30b899d9ef45637b270450514 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sat, 9 Dec 2023 23:24:43 +0900 Subject: [PATCH] fix: exchange: explicitly cast the block message limit const (#11511) It's not a const for the testground build, and needs to be an int 99% of the time. So we might as well just cast here. --- chain/exchange/protocol_encoding.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/exchange/protocol_encoding.go b/chain/exchange/protocol_encoding.go index ca15831d6..040dd0d40 100644 --- a/chain/exchange/protocol_encoding.go +++ b/chain/exchange/protocol_encoding.go @@ -79,7 +79,7 @@ func (t *messageIndices) UnmarshalCBOR(r io.Reader) (err error) { return fmt.Errorf("cbor input should be of type array") } - if extra > build.BlockMessageLimit { + if extra > uint64(build.BlockMessageLimit) { return fmt.Errorf("cbor input had wrong number of fields") }