@@ -3,6 +3,7 @@ package simulate
33import (
44 "encoding/hex"
55 "math/big"
6+ "strings"
67 "testing"
78 "time"
89
@@ -190,16 +191,14 @@ func TestRelayedV3(t *testing.T) {
190191 NumNodesWaitingListMeta : 3 ,
191192 NumNodesWaitingListShard : 3 ,
192193 AlterConfigsFunction : func (cfg * config.Configs ) {
193-
194+ cfg . EpochConfig . EnableEpochs . SCProcessorV2EnableEpoch = 2
194195 },
195196 })
196197 require .NoError (t , err )
197198 require .NotNil (t , cs )
198199
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 )
203202
204203 initialBalance := big .NewInt (0 ).Mul (oneEGLD , big .NewInt (10 ))
205204
@@ -232,6 +231,14 @@ func TestRelayedV3(t *testing.T) {
232231
233232 cost , err := cs .GetNodeHandler (0 ).GetFacadeHandler ().ComputeTransactionGasLimit (tx )
234233 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 )
235242 require .Equal (t , uint64 (855001 ), cost .GasUnits )
236243 require .Equal (t , "" , cost .ReturnMessage )
237244}
0 commit comments