Export the MaxBlockPayload constant.
Although you can technically get at this value via the MaxPayloadLength function on a block, it is less overhead for any consumers that need to know the value to simply export it directly.
This commit is contained in:
parent
7630a95724
commit
d54fba85b4
1 changed files with 3 additions and 3 deletions
|
@ -12,8 +12,8 @@ import (
|
|||
// MaxBlocksPerMsg is the maximum number of blocks allowed per message.
|
||||
const MaxBlocksPerMsg = 500
|
||||
|
||||
// maxBlockPayload is the maximum bytes a block message can be.
|
||||
const maxBlockPayload = (1024 * 1024) // 1MB
|
||||
// MaxBlockPayload is the maximum bytes a block message can be.
|
||||
const MaxBlockPayload = (1024 * 1024) // 1MB
|
||||
|
||||
// TxLoc holds locator data for the offset and length of where a transaction is
|
||||
// located within a MsgBlock data buffer.
|
||||
|
@ -135,7 +135,7 @@ func (msg *MsgBlock) Command() string {
|
|||
func (msg *MsgBlock) MaxPayloadLength(pver uint32) uint32 {
|
||||
// Block header at 81 bytes + max transactions which can vary up to the
|
||||
// maxBlockPayload (including the block header).
|
||||
return maxBlockPayload
|
||||
return MaxBlockPayload
|
||||
}
|
||||
|
||||
// BlockSha computes the block identifier hash for this block.
|
||||
|
|
Loading…
Reference in a new issue