@@ -329,7 +329,7 @@ func TestExecutionManager_AddPairForExecution(t *testing.T) {
329329 counter += 1
330330 }
331331 },
332- SetLastExecutionResultCalled : func (result data.BaseExecutionResultHandler ) {
332+ SetLastExecutionInfoCalled : func (header data. HeaderHandler , result data.BaseExecutionResultHandler ) {
333333 if bytes .Equal (result .GetHeaderHash (), []byte ("lastNotarizedExecResultHash" )) {
334334 counter += 1
335335 }
@@ -389,12 +389,7 @@ func TestExecutionManager_AddPairForExecution(t *testing.T) {
389389 Nonce : 10 ,
390390 }
391391 },
392- SetLastExecutedBlockHeaderAndRootHashCalled : func (header data.HeaderHandler , blockHash []byte , rootHash []byte ) {
393- if bytes .Equal (blockHash , []byte ("lastNotarizedExecResultHash" )) {
394- counter += 1
395- }
396- },
397- SetLastExecutionResultCalled : func (result data.BaseExecutionResultHandler ) {
392+ SetLastExecutionInfoCalled : func (header data.HeaderHandler , result data.BaseExecutionResultHandler ) {
398393 if bytes .Equal (result .GetHeaderHash (), []byte ("lastNotarizedExecResultHash" )) {
399394 counter += 1
400395 }
@@ -436,7 +431,7 @@ func TestExecutionManager_AddPairForExecution(t *testing.T) {
436431
437432 err := em .AddPairForExecution (pair )
438433 require .Equal (t , errExpected , err )
439- require .Equal (t , 2 , counter )
434+ require .Equal (t , 1 , counter )
440435 })
441436
442437 t .Run ("should work when the execution results of the previous header are notarized" , func (t * testing.T ) {
@@ -450,12 +445,7 @@ func TestExecutionManager_AddPairForExecution(t *testing.T) {
450445 Nonce : 10 ,
451446 }
452447 },
453- SetLastExecutedBlockHeaderAndRootHashCalled : func (header data.HeaderHandler , blockHash []byte , rootHash []byte ) {
454- if bytes .Equal (blockHash , []byte ("lastNotarizedExecResultHash" )) {
455- counter += 1
456- }
457- },
458- SetLastExecutionResultCalled : func (result data.BaseExecutionResultHandler ) {
448+ SetLastExecutionInfoCalled : func (header data.HeaderHandler , result data.BaseExecutionResultHandler ) {
459449 if bytes .Equal (result .GetHeaderHash (), []byte ("lastNotarizedExecResultHash" )) {
460450 counter += 1
461451 }
@@ -498,7 +488,7 @@ func TestExecutionManager_AddPairForExecution(t *testing.T) {
498488
499489 err := em .AddPairForExecution (pair )
500490 require .Nil (t , err )
501- require .Equal (t , 3 , counter )
491+ require .Equal (t , 2 , counter )
502492 })
503493
504494 t .Run ("should work if there are pending execution results of previous header" , func (t * testing.T ) {
@@ -512,12 +502,7 @@ func TestExecutionManager_AddPairForExecution(t *testing.T) {
512502 Nonce : 10 ,
513503 }
514504 },
515- SetLastExecutedBlockHeaderAndRootHashCalled : func (header data.HeaderHandler , blockHash []byte , rootHash []byte ) {
516- if bytes .Equal (blockHash , []byte ("hashY" )) {
517- counter += 1
518- }
519- },
520- SetLastExecutionResultCalled : func (result data.BaseExecutionResultHandler ) {
505+ SetLastExecutionInfoCalled : func (header data.HeaderHandler , result data.BaseExecutionResultHandler ) {
521506 if bytes .Equal (result .GetHeaderHash (), []byte ("hashY" )) {
522507 counter += 1
523508 }
@@ -572,7 +557,7 @@ func TestExecutionManager_AddPairForExecution(t *testing.T) {
572557
573558 err := em .AddPairForExecution (pair )
574559 require .Nil (t , err )
575- require .Equal (t , 3 , counter )
560+ require .Equal (t , 2 , counter )
576561 })
577562}
578563
0 commit comments