From d54fba85b473b57d1805c82a400ed531e482f3a9 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Thu, 20 Jun 2013 13:09:18 -0500 Subject: [PATCH] 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. --- msgblock.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msgblock.go b/msgblock.go index e3ecc488..a4a3208d 100644 --- a/msgblock.go +++ b/msgblock.go @@ -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.