@@ -5,6 +5,7 @@ package evm
55
66import (
77 "context"
8+ "log"
89 "math/big"
910 "testing"
1011 "time"
@@ -82,9 +83,10 @@ func TestEngineExecution(t *testing.T) {
8283
8384 prevStateRoot := rollkitGenesisStateRoot
8485 lastHeight , lastHash , lastTxs := checkLatestBlock (tt , ctx )
86+ log .Println ("lastTxs" , lastTxs )
8587 lastNonce := uint64 (0 )
8688
87- for blockHeight := initialHeight ; blockHeight <= 10 ; blockHeight ++ {
89+ for blockHeight := initialHeight ; blockHeight <= 1 ; blockHeight ++ {
8890 nTxs := int (blockHeight ) + 10
8991 // randomly use no transactions
9092 if blockHeight == 4 {
@@ -102,9 +104,18 @@ func TestEngineExecution(t *testing.T) {
102104 payload , err := executionClient .GetTxs (ctx )
103105 require .NoError (tt , err )
104106 require .Lenf (tt , payload , nTxs , "expected %d transactions, got %d" , nTxs , len (payload ))
107+ log .Println ("nTxs" , nTxs )
105108
106109 allPayloads = append (allPayloads , payload )
107110
111+ txs = make ([]* ethTypes.Transaction , nTxs )
112+ for i := range txs {
113+ txs [i ] = GetRandomTransaction (t , TEST_PRIVATE_KEY , TEST_TO_ADDRESS , CHAIN_ID , 22000 , & lastNonce )
114+ }
115+ for i := range txs {
116+ SubmitTransaction (t , txs [i ])
117+ }
118+
108119 // Check latest block before execution
109120 beforeHeight , beforeHash , beforeTxs := checkLatestBlock (tt , ctx )
110121 require .Equal (tt , lastHeight , beforeHeight , "Latest block height should match" )
@@ -124,7 +135,7 @@ func TestEngineExecution(t *testing.T) {
124135 lastHeight , lastHash , lastTxs = checkLatestBlock (tt , ctx )
125136 require .Equal (tt , blockHeight , lastHeight , "Latest block height should match" )
126137 require .NotEmpty (tt , lastHash .Hex (), "Latest block hash should not be empty" )
127- require .GreaterOrEqual (tt , lastTxs , 0 , "Number of transactions should be non-negative " )
138+ require .Equal (tt , lastTxs , nTxs , "Number of transactions should be equal " )
128139
129140 if nTxs == 0 {
130141 require .Equal (tt , prevStateRoot , newStateRoot )
@@ -141,6 +152,7 @@ func TestEngineExecution(t *testing.T) {
141152
142153 // start new container and try to sync
143154 t .Run ("Sync chain" , func (tt * testing.T ) {
155+ tt .Skip ("Skip sync chain" )
144156 jwtSecret := SetupTestRethEngine (t , DOCKER_PATH , JWT_FILENAME )
145157
146158 executionClient , err := NewEngineExecutionClient (
0 commit comments