Skip to content

Commit

Permalink
fix: exchange: explicitly cast the block message limit const (#11511)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Stebalien authored and jennijuju committed Dec 9, 2023
1 parent e8b5d18 commit aa64136
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chain/exchange/protocol_encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit aa64136

Please sign in to comment.