Skip to content

Commit 0eb0d7a

Browse files
test(rpcv10): fix outdated mocks for rpcv10 (#3546)
test: fix outdated mocks for `rpcv10`
1 parent 2c153b9 commit 0eb0d7a

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

rpc/v10/block_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ func TestBlockTransactionCount(t *testing.T) {
537537
})
538538

539539
t.Run("non-existent pre_confirmed block", func(t *testing.T) {
540-
mockSyncReader.EXPECT().PendingData().Return(nil, db.ErrKeyNotFound)
540+
mockSyncReader.EXPECT().PreConfirmed().Return(nil, db.ErrKeyNotFound)
541541
preConfirmed := rpc.BlockIDPreConfirmed()
542542
count, rpcErr := handler.BlockTransactionCount(&preConfirmed)
543543
require.Equal(t, rpccore.ErrBlockNotFound, rpcErr)
@@ -596,7 +596,7 @@ func TestBlockTransactionCount(t *testing.T) {
596596
latestBlock.Hash = nil
597597
latestBlock.GlobalStateRoot = nil
598598
preConfirmed := core.NewPreConfirmed(latestBlock, nil, nil, nil)
599-
mockSyncReader.EXPECT().PendingData().Return(
599+
mockSyncReader.EXPECT().PreConfirmed().Return(
600600
&preConfirmed,
601601
nil,
602602
)

rpc/v10/class_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func TestClassHashAt(t *testing.T) {
248248
StateDiff: &stateDiff,
249249
},
250250
}
251-
mockSyncReader.EXPECT().PendingData().Return(&preConfirmed, nil)
251+
mockSyncReader.EXPECT().PreConfirmed().Return(&preConfirmed, nil)
252252
mockReader.EXPECT().StateAtBlockNumber(preConfirmed.Block.Number-1).
253253
Return(mockState, nopCloser, nil)
254254

rpc/v10/l1_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func TestGetMessageStatus(t *testing.T) {
111111
},
112112
},
113113
}
114-
mockSyncReader.EXPECT().PendingData().Return(preConfirmed, nil).AnyTimes()
114+
mockSyncReader.EXPECT().PreConfirmed().Return(preConfirmed, nil).AnyTimes()
115115
l1handlerTxns := make([]core.Transaction, len(test.msgs))
116116
for i := range len(test.msgs) {
117117
//nolint:staticcheck //SA1019: used here to get the stored txs in testdata feeder

rpc/v10/nonce_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func TestNonce(t *testing.T) {
113113
},
114114
}
115115

116-
mockSyncReader.EXPECT().PendingData().Return(&preConfirmed, nil)
116+
mockSyncReader.EXPECT().PreConfirmed().Return(&preConfirmed, nil)
117117
mockReader.EXPECT().StateAtBlockNumber(preConfirmed.Block.Number-1).
118118
Return(mockState, nopCloser, nil)
119119
preConfirmedBlockID := rpc.BlockIDPreConfirmed()

0 commit comments

Comments
 (0)