@@ -3,6 +3,7 @@ package simulate
3
3
import (
4
4
"encoding/hex"
5
5
"math/big"
6
+ "strings"
6
7
"testing"
7
8
"time"
8
9
@@ -190,16 +191,14 @@ func TestRelayedV3(t *testing.T) {
190
191
NumNodesWaitingListMeta : 3 ,
191
192
NumNodesWaitingListShard : 3 ,
192
193
AlterConfigsFunction : func (cfg * config.Configs ) {
193
-
194
+ cfg . EpochConfig . EnableEpochs . SCProcessorV2EnableEpoch = 2
194
195
},
195
196
})
196
197
require .NoError (t , err )
197
198
require .NotNil (t , cs )
198
199
199
- for idx := 0 ; idx < 4 ; idx ++ {
200
- err = cs .ForceChangeOfEpoch ()
201
- require .NoError (t , err )
202
- }
200
+ err = cs .ForceChangeOfEpoch ()
201
+ require .NoError (t , err )
203
202
204
203
initialBalance := big .NewInt (0 ).Mul (oneEGLD , big .NewInt (10 ))
205
204
@@ -232,6 +231,14 @@ func TestRelayedV3(t *testing.T) {
232
231
233
232
cost , err := cs .GetNodeHandler (0 ).GetFacadeHandler ().ComputeTransactionGasLimit (tx )
234
233
require .NoError (t , err )
234
+ require .Equal (t , uint64 (0 ), cost .GasUnits )
235
+ require .True (t , strings .Contains (cost .ReturnMessage , "insufficient funds" ))
236
+
237
+ err = cs .ForceChangeOfEpoch ()
238
+ require .NoError (t , err )
239
+
240
+ cost , err = cs .GetNodeHandler (0 ).GetFacadeHandler ().ComputeTransactionGasLimit (tx )
241
+ require .NoError (t , err )
235
242
require .Equal (t , uint64 (855001 ), cost .GasUnits )
236
243
require .Equal (t , "" , cost .ReturnMessage )
237
244
}
0 commit comments