This repository was archived by the owner on Nov 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1435,6 +1435,7 @@ func TestBuildBlockWithInsufficientCapacity(t *testing.T) {
14351435 require .NoError (err )
14361436
14371437 require .NoError (blk2 .Accept (ctx ))
1438+ require .NoError (vm .SetPreference (t .Context (), blk2 .ID ()))
14381439
14391440 // Attempt to build a block consuming more than the current gas capacity
14401441 _ , err = vmtest .IssueTxsAndBuild ([]* types.Transaction {txs [1 ]}, vm )
@@ -1453,6 +1454,7 @@ func TestBuildBlockWithInsufficientCapacity(t *testing.T) {
14531454
14541455 require .NoError (blk3 .Verify (ctx ))
14551456 require .NoError (blk3 .Accept (ctx ))
1457+ vm .SetPreference (t .Context (), blk3 .ID ())
14561458}
14571459
14581460func TestBuildBlockLargeTxStarvation (t * testing.T ) {
@@ -1503,6 +1505,7 @@ func TestBuildBlockLargeTxStarvation(t *testing.T) {
15031505 require .NoError (err )
15041506
15051507 require .NoError (blk2 .Accept (ctx ))
1508+ vm .SetPreference (t .Context (), blk2 .ID ())
15061509
15071510 // Add a second transaction trying to consume the max guaranteed gas capacity at a higher gas price
15081511 errs := vm .txPool .AddRemotesSync ([]* types.Transaction {maxSizeTxs [1 ]})
@@ -1708,6 +1711,7 @@ func TestWaitForEvent(t *testing.T) {
17081711 require .NoError (t , err )
17091712 err = blk2 .Accept (t .Context ())
17101713 require .NoError (t , err )
1714+ vm .SetPreference (t .Context (), blk2 .ID ())
17111715 wg .Wait ()
17121716 },
17131717 },
Original file line number Diff line number Diff line change @@ -104,8 +104,6 @@ func (b *wrappedBlock) Accept(context.Context) error {
104104 "height" , b .Height (),
105105 )
106106
107- vm .setPendingBlock (b .ethBlock .Hash ())
108-
109107 // Call Accept for relevant precompile logs. Note we do this prior to
110108 // calling Accept on the blockChain so any side effects (eg warp signatures)
111109 // take place before the accepted log is emitted to subscribers.
You can’t perform that action at this time.
0 commit comments