[lbry] wire: increase wire.MaxBlockPayload to 8MB

This commit is contained in:
Roy Lee 2022-02-03 22:43:34 -08:00
parent abe121ea6e
commit 31d3d9debc
4 changed files with 5 additions and 5 deletions

View file

@ -23,8 +23,8 @@ const defaultTransactionAlloc = 2048
const MaxBlocksPerMsg = 500
// MaxBlockPayload is the maximum bytes a block message can be in bytes.
// After Segregated Witness, the max block payload has been raised to 4MB.
const MaxBlockPayload = 4000000
// After Segregated Witness, the max block payload has been raised to 8MB.
const MaxBlockPayload = 8000000
// maxTxPerBlock is the maximum number of transactions that could
// possibly fit into a block.

View file

@ -36,7 +36,7 @@ func TestBlock(t *testing.T) {
// Ensure max payload is expected value for latest protocol version.
// Num addresses (varInt) + max allowed addresses.
wantPayload := uint32(4000000)
wantPayload := uint32(8000000)
maxPayload := msg.MaxPayloadLength(pver)
if maxPayload != wantPayload {
t.Errorf("MaxPayloadLength: wrong max payload length for "+

View file

@ -38,7 +38,7 @@ func TestMerkleBlock(t *testing.T) {
// Ensure max payload is expected value for latest protocol version.
// Num addresses (varInt) + max allowed addresses.
wantPayload := uint32(4000000)
wantPayload := uint32(8000000)
maxPayload := msg.MaxPayloadLength(pver)
if maxPayload != wantPayload {
t.Errorf("MaxPayloadLength: wrong max payload length for "+

View file

@ -35,7 +35,7 @@ func TestTx(t *testing.T) {
}
// Ensure max payload is expected value for latest protocol version.
wantPayload := uint32(1000 * 4000)
wantPayload := uint32(1000 * 8000)
maxPayload := msg.MaxPayloadLength(pver)
if maxPayload != wantPayload {
t.Errorf("MaxPayloadLength: wrong max payload length for "+