mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-19 21:36:43 +00:00
Export MaxBlockHeaderPayload.
This commit is contained in:
parent
e5d15b0fa8
commit
0e1f6a6628
@ -15,7 +15,7 @@ const BlockVersion uint32 = 2
|
||||
|
||||
// Version 4 bytes + Timestamp 4 bytes + Bits 4 bytes + Nonce 4 bytes +
|
||||
// PrevBlock and MerkleRoot hashes.
|
||||
const maxBlockHeaderPayload = 16 + (HashSize * 2)
|
||||
const MaxBlockHeaderPayload = 16 + (HashSize * 2)
|
||||
|
||||
// BlockHeader defines information about a block and is used in the bitcoin
|
||||
// block (MsgBlock) and headers (MsgHeaders) messages.
|
||||
|
@ -121,7 +121,7 @@ func (msg *MsgHeaders) Command() string {
|
||||
func (msg *MsgHeaders) MaxPayloadLength(pver uint32) uint32 {
|
||||
// Num headers (varInt) + max allowed headers (header length + 1 byte
|
||||
// for the number of transactions which is always 0).
|
||||
return MaxVarIntPayload + ((maxBlockHeaderPayload + 1) *
|
||||
return MaxVarIntPayload + ((MaxBlockHeaderPayload + 1) *
|
||||
MaxBlockHeadersPerMsg)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user