Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jewei1997 committed Nov 17, 2024
1 parent ad0caf0 commit 6296b52
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions evmrpc/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestGetBlockReceipts(t *testing.T) {
// Query by block height
resObj := sendRequestGood(t, "getBlockReceipts", "0x2")
result := resObj["result"].([]interface{})
require.Equal(t, 6, len(result))
require.Equal(t, 5, len(result))
receipt1 := result[0].(map[string]interface{})
require.Equal(t, "0x2", receipt1["blockNumber"])
require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt1["transactionHash"])
Expand All @@ -91,10 +91,14 @@ func TestGetBlockReceipts(t *testing.T) {
require.Equal(t, "0x2", receipt3["blockNumber"])
require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt3["transactionHash"])

resObjSei := sendSeiRequestGood(t, "getBlockReceipts", "0x2")
result = resObjSei["result"].([]interface{})
require.Equal(t, 6, len(result))

// Query by block hash
resObj2 := sendRequestGood(t, "getBlockReceipts", "0x0000000000000000000000000000000000000000000000000000000000000002")
result = resObj2["result"].([]interface{})
require.Equal(t, 6, len(result))
require.Equal(t, 5, len(result))
receipt1 = result[0].(map[string]interface{})
require.Equal(t, "0x2", receipt1["blockNumber"])
require.Equal(t, "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", receipt1["transactionHash"])
Expand Down
1 change: 0 additions & 1 deletion evmrpc/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package evmrpc
import (
"context"
"errors"
"fmt"
"math/big"
"slices"
"time"
Expand Down
1 change: 1 addition & 0 deletions evmrpc/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ func setupLogs() {
},
}}}})
EVMKeeper.MockReceipt(CtxMock, multiTxBlockSynthTx.Hash(), &types.Receipt{
TxType: evmrpc.ShellEVMTxType,
BlockNumber: MockHeight,
TransactionIndex: 0,
TxHashHex: multiTxBlockSynthTx.Hash().Hex(),
Expand Down

0 comments on commit 6296b52

Please sign in to comment.