[lbry] wire: increase wire.MaxBlockPayload to 8MB
This commit is contained in:
parent
abe121ea6e
commit
31d3d9debc
4 changed files with 5 additions and 5 deletions
|
@ -23,8 +23,8 @@ const defaultTransactionAlloc = 2048
|
||||||
const MaxBlocksPerMsg = 500
|
const MaxBlocksPerMsg = 500
|
||||||
|
|
||||||
// MaxBlockPayload is the maximum bytes a block message can be in bytes.
|
// MaxBlockPayload is the maximum bytes a block message can be in bytes.
|
||||||
// After Segregated Witness, the max block payload has been raised to 4MB.
|
// After Segregated Witness, the max block payload has been raised to 8MB.
|
||||||
const MaxBlockPayload = 4000000
|
const MaxBlockPayload = 8000000
|
||||||
|
|
||||||
// maxTxPerBlock is the maximum number of transactions that could
|
// maxTxPerBlock is the maximum number of transactions that could
|
||||||
// possibly fit into a block.
|
// possibly fit into a block.
|
||||||
|
|
|
@ -36,7 +36,7 @@ func TestBlock(t *testing.T) {
|
||||||
|
|
||||||
// Ensure max payload is expected value for latest protocol version.
|
// Ensure max payload is expected value for latest protocol version.
|
||||||
// Num addresses (varInt) + max allowed addresses.
|
// Num addresses (varInt) + max allowed addresses.
|
||||||
wantPayload := uint32(4000000)
|
wantPayload := uint32(8000000)
|
||||||
maxPayload := msg.MaxPayloadLength(pver)
|
maxPayload := msg.MaxPayloadLength(pver)
|
||||||
if maxPayload != wantPayload {
|
if maxPayload != wantPayload {
|
||||||
t.Errorf("MaxPayloadLength: wrong max payload length for "+
|
t.Errorf("MaxPayloadLength: wrong max payload length for "+
|
||||||
|
|
|
@ -38,7 +38,7 @@ func TestMerkleBlock(t *testing.T) {
|
||||||
|
|
||||||
// Ensure max payload is expected value for latest protocol version.
|
// Ensure max payload is expected value for latest protocol version.
|
||||||
// Num addresses (varInt) + max allowed addresses.
|
// Num addresses (varInt) + max allowed addresses.
|
||||||
wantPayload := uint32(4000000)
|
wantPayload := uint32(8000000)
|
||||||
maxPayload := msg.MaxPayloadLength(pver)
|
maxPayload := msg.MaxPayloadLength(pver)
|
||||||
if maxPayload != wantPayload {
|
if maxPayload != wantPayload {
|
||||||
t.Errorf("MaxPayloadLength: wrong max payload length for "+
|
t.Errorf("MaxPayloadLength: wrong max payload length for "+
|
||||||
|
|
|
@ -35,7 +35,7 @@ func TestTx(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure max payload is expected value for latest protocol version.
|
// Ensure max payload is expected value for latest protocol version.
|
||||||
wantPayload := uint32(1000 * 4000)
|
wantPayload := uint32(1000 * 8000)
|
||||||
maxPayload := msg.MaxPayloadLength(pver)
|
maxPayload := msg.MaxPayloadLength(pver)
|
||||||
if maxPayload != wantPayload {
|
if maxPayload != wantPayload {
|
||||||
t.Errorf("MaxPayloadLength: wrong max payload length for "+
|
t.Errorf("MaxPayloadLength: wrong max payload length for "+
|
||||||
|
|
Loading…
Reference in a new issue