mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
Correct discardInput comment for buffer size.
This was pointed out by kaptin on IRC.
This commit is contained in:
parent
3cd90355df
commit
c369c0c16e
@ -145,7 +145,7 @@ func readMessageHeader(r io.Reader) (*messageHeader, error) {
|
||||
// prevent rogue nodes from causing massive memory allocation through forging
|
||||
// header length.
|
||||
func discardInput(r io.Reader, n uint32) {
|
||||
maxSize := uint32(10240) // 2k at a time
|
||||
maxSize := uint32(10 * 1024) // 10k at a time
|
||||
numReads := n / maxSize
|
||||
bytesRemaining := n % maxSize
|
||||
if n > 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user