@@ -254,7 +254,7 @@ func TestGetSequentialBlockDataToCommit(t *testing.T) {
254254 BlockNumbers : []* big.Int {big .NewInt (101 ), big .NewInt (102 ), big .NewInt (103 )},
255255 }).Return (blockData , nil )
256256
257- result , err := committer .getSequentialBlockDataToCommit ()
257+ result , err := committer .getSequentialBlockDataToCommit (context . Background () )
258258
259259 assert .NoError (t , err )
260260 assert .NotNil (t , result )
@@ -290,7 +290,7 @@ func TestGetSequentialBlockDataToCommitWithDuplicateBlocks(t *testing.T) {
290290 BlockNumbers : []* big.Int {big .NewInt (101 ), big .NewInt (102 ), big .NewInt (103 )},
291291 }).Return (blockData , nil )
292292
293- result , err := committer .getSequentialBlockDataToCommit ()
293+ result , err := committer .getSequentialBlockDataToCommit (context . Background () )
294294
295295 assert .NoError (t , err )
296296 assert .NotNil (t , result )
@@ -320,7 +320,7 @@ func TestCommit(t *testing.T) {
320320 mockMainStorage .EXPECT ().InsertBlockData (blockData ).Return (nil )
321321 mockStagingStorage .EXPECT ().DeleteStagingData (blockData ).Return (nil )
322322
323- err := committer .commit (blockData )
323+ err := committer .commit (context . Background (), blockData )
324324
325325 assert .NoError (t , err )
326326}
@@ -343,7 +343,7 @@ func TestHandleGap(t *testing.T) {
343343 mockRPC .EXPECT ().GetBlocksPerRequest ().Return (rpc.BlocksPerRequestConfig {
344344 Blocks : 5 ,
345345 })
346- mockRPC .EXPECT ().GetFullBlocks ([]* big.Int {big .NewInt (100 ), big .NewInt (101 ), big .NewInt (102 ), big .NewInt (103 ), big .NewInt (104 )}).Return ([]rpc.GetFullBlockResult {
346+ mockRPC .EXPECT ().GetFullBlocks (context . Background (), []* big.Int {big .NewInt (100 ), big .NewInt (101 ), big .NewInt (102 ), big .NewInt (103 ), big .NewInt (104 )}).Return ([]rpc.GetFullBlockResult {
347347 {BlockNumber : big .NewInt (100 ), Data : common.BlockData {Block : common.Block {Number : big .NewInt (100 )}}},
348348 {BlockNumber : big .NewInt (101 ), Data : common.BlockData {Block : common.Block {Number : big .NewInt (101 )}}},
349349 {BlockNumber : big .NewInt (102 ), Data : common.BlockData {Block : common.Block {Number : big .NewInt (102 )}}},
@@ -352,7 +352,7 @@ func TestHandleGap(t *testing.T) {
352352 })
353353 mockStagingStorage .EXPECT ().InsertStagingData (mock .Anything ).Return (nil )
354354
355- err := committer .handleGap (expectedStartBlockNumber , actualFirstBlock )
355+ err := committer .handleGap (context . Background (), expectedStartBlockNumber , actualFirstBlock )
356356
357357 assert .Error (t , err )
358358 assert .Contains (t , err .Error (), "first block number (105) in commit batch does not match expected (100)" )
@@ -463,7 +463,7 @@ func TestHandleMissingStagingData(t *testing.T) {
463463 mockRPC .EXPECT ().GetBlocksPerRequest ().Return (rpc.BlocksPerRequestConfig {
464464 Blocks : 100 ,
465465 })
466- mockRPC .EXPECT ().GetFullBlocks ([]* big.Int {big .NewInt (0 ), big .NewInt (1 ), big .NewInt (2 ), big .NewInt (3 ), big .NewInt (4 )}).Return ([]rpc.GetFullBlockResult {
466+ mockRPC .EXPECT ().GetFullBlocks (context . Background (), []* big.Int {big .NewInt (0 ), big .NewInt (1 ), big .NewInt (2 ), big .NewInt (3 ), big .NewInt (4 )}).Return ([]rpc.GetFullBlockResult {
467467 {BlockNumber : big .NewInt (0 ), Data : common.BlockData {Block : common.Block {Number : big .NewInt (0 )}}},
468468 {BlockNumber : big .NewInt (1 ), Data : common.BlockData {Block : common.Block {Number : big .NewInt (1 )}}},
469469 {BlockNumber : big .NewInt (2 ), Data : common.BlockData {Block : common.Block {Number : big .NewInt (2 )}}},
@@ -482,7 +482,7 @@ func TestHandleMissingStagingData(t *testing.T) {
482482 BlockNumbers : []* big.Int {big .NewInt (0 ), big .NewInt (1 ), big .NewInt (2 ), big .NewInt (3 ), big .NewInt (4 )},
483483 }).Return (blockData , nil )
484484
485- result , err := committer .getSequentialBlockDataToCommit ()
485+ result , err := committer .getSequentialBlockDataToCommit (context . Background () )
486486
487487 assert .NoError (t , err )
488488 assert .Nil (t , result )
@@ -509,7 +509,7 @@ func TestHandleMissingStagingDataIsPolledWithCorrectBatchSize(t *testing.T) {
509509 mockRPC .EXPECT ().GetBlocksPerRequest ().Return (rpc.BlocksPerRequestConfig {
510510 Blocks : 3 ,
511511 })
512- mockRPC .EXPECT ().GetFullBlocks ([]* big.Int {big .NewInt (0 ), big .NewInt (1 ), big .NewInt (2 )}).Return ([]rpc.GetFullBlockResult {
512+ mockRPC .EXPECT ().GetFullBlocks (context . Background (), []* big.Int {big .NewInt (0 ), big .NewInt (1 ), big .NewInt (2 )}).Return ([]rpc.GetFullBlockResult {
513513 {BlockNumber : big .NewInt (0 ), Data : common.BlockData {Block : common.Block {Number : big .NewInt (0 )}}},
514514 {BlockNumber : big .NewInt (1 ), Data : common.BlockData {Block : common.Block {Number : big .NewInt (1 )}}},
515515 {BlockNumber : big .NewInt (2 ), Data : common.BlockData {Block : common.Block {Number : big .NewInt (2 )}}},
@@ -526,7 +526,7 @@ func TestHandleMissingStagingDataIsPolledWithCorrectBatchSize(t *testing.T) {
526526 BlockNumbers : []* big.Int {big .NewInt (0 ), big .NewInt (1 ), big .NewInt (2 ), big .NewInt (3 ), big .NewInt (4 )},
527527 }).Return (blockData , nil )
528528
529- result , err := committer .getSequentialBlockDataToCommit ()
529+ result , err := committer .getSequentialBlockDataToCommit (context . Background () )
530530
531531 assert .NoError (t , err )
532532 assert .Nil (t , result )
0 commit comments