Skip to content

Commit 99ea05e

Browse files
committed
fix linter issues
1 parent 47f3310 commit 99ea05e

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

core/blockchain_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2408,6 +2408,9 @@ func TestProcessingStateDiffs(t *testing.T) {
24082408

24092409
moreBlocks := makeBlockChain(blocks[len(blocks)-1], 1, engine, db, canonicalSeed)
24102410
_, err = blockchain.InsertChain(moreBlocks)
2411+
if err != nil {
2412+
t.Error(err)
2413+
}
24112414

24122415
//a root hash can be dereferenced when it's state diff and it's child's state diff have been processed
24132416
//(i.e. it has a count of 2 in stateDiffsProcessed)

statediff/testhelpers/mocks/api_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ func testHTTPAPI(t *testing.T) {
166166
streamBlock: true,
167167
}
168168
payload, err := mockService.StateDiffAt(block1.Number().Uint64())
169+
if err != nil {
170+
t.Error(err)
171+
}
169172
expectedBlockRlp, _ := rlp.EncodeToBytes(block1)
170173
if !bytes.Equal(payload.BlockRlp, expectedBlockRlp) {
171174
t.Errorf("payload does not have expected block\r\actual block rlp: %v\r\nexpected block rlp: %v", payload.BlockRlp, expectedBlockRlp)

statediff/types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ func (sd *Payload) Encode() ([]byte, error) {
6464

6565
// StateDiff is the final output structure from the builder
6666
type StateDiff struct {
67-
BlockNumber *big.Int `json:"blockNumber" gencodec:"required"`
68-
BlockHash common.Hash `json:"blockHash" gencodec:"required"`
67+
BlockNumber *big.Int `json:"blockNumber" gencodec:"required"`
68+
BlockHash common.Hash `json:"blockHash" gencodec:"required"`
6969
CreatedAccounts []AccountDiff `json:"createdAccounts" gencodec:"required"`
7070
DeletedAccounts []AccountDiff `json:"deletedAccounts" gencodec:"required"`
7171
UpdatedAccounts []AccountDiff `json:"updatedAccounts" gencodec:"required"`
@@ -76,7 +76,7 @@ type StateDiff struct {
7676

7777
// AccountDiff holds the data for a single state diff node
7878
type AccountDiff struct {
79-
Leaf bool `json:"leaf" gencodec:"required"`
79+
Leaf bool `json:"leaf" gencodec:"required"`
8080
Key []byte `json:"key" gencodec:"required"`
8181
Value []byte `json:"value" gencodec:"required"`
8282
Proof [][]byte `json:"proof" gencodec:"required"`
@@ -86,7 +86,7 @@ type AccountDiff struct {
8686

8787
// StorageDiff holds the data for a single storage diff node
8888
type StorageDiff struct {
89-
Leaf bool `json:"leaf" gencodec:"required"`
89+
Leaf bool `json:"leaf" gencodec:"required"`
9090
Key []byte `json:"key" gencodec:"required"`
9191
Value []byte `json:"value" gencodec:"required"`
9292
Proof [][]byte `json:"proof" gencodec:"required"`

0 commit comments

Comments
 (0)