mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[DEV-14] Made MaxNumPrevBlocks a const
This commit is contained in:
parent
a655bd9861
commit
e6e9deef22
@ -20,9 +20,13 @@ import (
|
||||
// added to this value
|
||||
const BaseBlockHeaderPayload = 21 + (chainhash.HashSize)
|
||||
|
||||
// MaxNumPrevBlocks is the maximum number of previous blocks a block can reference.
|
||||
// Currently set to 255 as the maximum number NumPrevBlocks can be due to it being a byte
|
||||
const MaxNumPrevBlocks = 255
|
||||
|
||||
// MaxBlockHeaderPayload is the maximum number of bytes a block header can be.
|
||||
// BaseBlockHeaderPayload + up to 255 hashes of previous blocks
|
||||
const MaxBlockHeaderPayload = BaseBlockHeaderPayload + (255 * chainhash.HashSize)
|
||||
// BaseBlockHeaderPayload + up to MaxNumPrevBlocks hashes of previous blocks
|
||||
const MaxBlockHeaderPayload = BaseBlockHeaderPayload + (MaxNumPrevBlocks * chainhash.HashSize)
|
||||
|
||||
// BlockHeader defines information about a block and is used in the bitcoin
|
||||
// block (MsgBlock) and headers (MsgHeader ) messages.
|
||||
|
Loading…
x
Reference in New Issue
Block a user