Skip to content

Commit e053c0d

Browse files
committed
fixes after review
1 parent db371eb commit e053c0d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

facade/nodeFacade_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,11 +1145,11 @@ func TestNodeFacade_GetProofCurrentRootHash(t *testing.T) {
11451145
t.Run("should work with header v3", func(t *testing.T) {
11461146
t.Parallel()
11471147

1148-
rootHash := []byte("rootHash1")
1148+
rootHash1 := []byte("rootHash1")
11491149
expectedResponse := &common.GetProofResponse{
11501150
Proof: [][]byte{[]byte("valid"), []byte("proof")},
11511151
Value: []byte("value"),
1152-
RootHash: string(rootHash),
1152+
RootHash: string(rootHash1),
11531153
}
11541154

11551155
arg := createMockArguments()
@@ -1158,12 +1158,12 @@ func TestNodeFacade_GetProofCurrentRootHash(t *testing.T) {
11581158
return &block.HeaderV3{}
11591159
},
11601160
GetLastExecutedBlockInfoCalled: func() (uint64, []byte, []byte) {
1161-
return 0, []byte(""), rootHash
1161+
return 0, []byte(""), rootHash1
11621162
},
11631163
}
11641164
arg.Node = &mock.NodeStub{
11651165
GetProofCalled: func(rootHash string, _ string) (*common.GetProofResponse, error) {
1166-
require.Equal(t, rootHash, rootHash)
1166+
require.Equal(t, hex.EncodeToString(rootHash1), rootHash)
11671167
return expectedResponse, nil
11681168
},
11691169
}

process/block/shardblockProposal.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,13 @@ func (sp *shardProcessor) ProcessBlockProposal(
394394
}
395395

396396
func (sp *shardProcessor) checkRootHashBeforeExecution() error {
397-
lastCommitedRootHash, err := sp.accountsDB[state.UserAccountsState].RootHash()
397+
lastCommittedRootHash, err := sp.accountsDB[state.UserAccountsState].RootHash()
398398
if err != nil {
399399
return err
400400
}
401401

402402
currentRootHash := sp.blockChain.GetCurrentBlockRootHash()
403-
if !bytes.Equal(lastCommitedRootHash, currentRootHash) {
403+
if !bytes.Equal(lastCommittedRootHash, currentRootHash) {
404404
return process.ErrRootStateDoesNotMatch
405405
}
406406

0 commit comments

Comments
 (0)