Skip to content

Commit ecf66f0

Browse files
authored
Fix comparison test (okx#748)
1 parent bfd8116 commit ecf66f0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

zk/realtime/test/comparison_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ func TestRealtimeComparison(t *testing.T) {
113113
t.Run("getBlockByHash", func(t *testing.T) {
114114
allPassed := true
115115

116-
// add pending to test getBlockByHash
117-
testBlocks = append(testBlocks, "pending")
118-
119116
for _, blockParam := range testBlocks {
120117
blockNumber, err := convertBlockParam(client, blockParam)
121118
if err != nil {
@@ -346,7 +343,7 @@ func TestRealtimeComparison(t *testing.T) {
346343
var nonRealtimeBlockNumber string
347344
err = nonRealtimeRPCClient.CallContext(context.Background(), &nonRealtimeBlockNumber, "eth_blockNumber")
348345
require.NoError(t, err)
349-
require.Equal(t, "0x"+strconv.FormatUint(realtimeBlockNumber, 16), nonRealtimeBlockNumber, "Block numbers should match")
346+
require.GreaterOrEqual(t, "0x"+strconv.FormatUint(realtimeBlockNumber, 16), nonRealtimeBlockNumber, "Realtime block number should be at least as big as non-realtime block number")
350347
})
351348

352349
t.Run("call", func(t *testing.T) {

0 commit comments

Comments
 (0)