Browse Source

be more precise in comments

pull/2184/head
Anton Kaliaev 6 years ago
parent
commit
e957f322c7
No known key found for this signature in database GPG Key ID: 7B6881D965918214
3 changed files with 5 additions and 4 deletions
  1. +2
    -1
      types/block.go
  2. +1
    -2
      types/block_test.go
  3. +2
    -1
      types/tx.go

+ 2
- 1
types/block.go View File

@ -17,7 +17,8 @@ const (
// MaxHeaderBytes is a maximum header size (including amino overhead). // MaxHeaderBytes is a maximum header size (including amino overhead).
MaxHeaderBytes = 478 MaxHeaderBytes = 478
// MaxAminoOverheadForBlock - amino overhead to encode the block.
// MaxAminoOverheadForBlock - maximum amino overhead to encode a block (up to
// MaxBlockSizeBytes in size).
MaxAminoOverheadForBlock = 4 MaxAminoOverheadForBlock = 4
) )


+ 1
- 2
types/block_test.go View File

@ -107,7 +107,6 @@ func TestBlockMakePartSet(t *testing.T) {
func TestBlockMakePartSetWithEvidence(t *testing.T) { func TestBlockMakePartSetWithEvidence(t *testing.T) {
assert.Nil(t, (*Block)(nil).MakePartSet(2)) assert.Nil(t, (*Block)(nil).MakePartSet(2))
txs := []Tx{Tx("foo"), Tx("bar")}
lastID := makeBlockIDRandom() lastID := makeBlockIDRandom()
h := int64(3) h := int64(3)
@ -118,7 +117,7 @@ func TestBlockMakePartSetWithEvidence(t *testing.T) {
ev := NewMockGoodEvidence(h, 0, valSet.Validators[0].Address) ev := NewMockGoodEvidence(h, 0, valSet.Validators[0].Address)
evList := []Evidence{ev} evList := []Evidence{ev}
partSet := MakeBlock(h, txs, commit, evList).MakePartSet(1024)
partSet := MakeBlock(h, []Tx{Tx("Hello World")}, commit, evList).MakePartSet(1024)
assert.NotNil(t, partSet) assert.NotNil(t, partSet)
assert.Equal(t, 2, partSet.Total()) assert.Equal(t, 2, partSet.Total())
} }


+ 2
- 1
types/tx.go View File

@ -12,7 +12,8 @@ import (
) )
const ( const (
// MaxAminoOverheadForTx - amino overhead to encode a transaction.
// MaxAminoOverheadForTx - maximum amino overhead to encode a transaction
// (ranges from 1 to 4 bytes).
MaxAminoOverheadForTx = 4 MaxAminoOverheadForTx = 4
) )


Loading…
Cancel
Save