p2p/msgrate: return capacity as integer, clamp to max uint32 (#22943)
* p2p/msgrate: return capacity as integer * eth/protocols/snap: remove conversions * p2p/msgrate: add overflow test * p2p/msgrate: make the capacity overflow test actually overflow * p2p/msgrate: clamp capacity to max int32 * p2p/msgrate: fix min/max confusion
Showing
- eth/downloader/peer.go 25 additions, 23 deletionseth/downloader/peer.go
- eth/protocols/snap/sync.go 15 additions, 15 deletionseth/protocols/snap/sync.go
- p2p/msgrate/msgrate.go 11 additions, 3 deletionsp2p/msgrate/msgrate.go
- p2p/msgrate/msgrate_test.go 28 additions, 0 deletionsp2p/msgrate/msgrate_test.go
Loading
Please register or sign in to comment