@@ -976,14 +976,10 @@ func (bp *baseProcessor) cleanupPools(headerHandler data.HeaderHandler) {
976976 highestPrevFinalBlockNonce ,
977977 )
978978
979- if bp .enableEpochsHandler .IsFlagEnabled (common .EquivalentMessagesFlag ) {
980- err := bp .dataPool .Proofs ().CleanupProofsBehindNonce (bp .shardCoordinator .SelfId (), highestPrevFinalBlockNonce )
981- if err != nil {
982- log .Warn ("failed to cleanup notarized proofs behind nonce" ,
983- "nonce" , noncesToPrevFinal ,
984- "shardID" , bp .shardCoordinator .SelfId (),
985- "error" , err )
986- }
979+ err := bp .dataPool .Proofs ().CleanupProofsBehindNonce (bp .shardCoordinator .SelfId (), highestPrevFinalBlockNonce )
980+ if err != nil {
981+ log .Warn ("%w: failed to cleanup notarized proofs behind nonce %d on shardID %d" ,
982+ err , noncesToPrevFinal , bp .shardCoordinator .SelfId ())
987983 }
988984
989985 if bp .shardCoordinator .SelfId () == core .MetachainShardId {
@@ -1015,14 +1011,10 @@ func (bp *baseProcessor) cleanupPoolsForCrossShard(
10151011 crossNotarizedHeader .GetNonce (),
10161012 )
10171013
1018- if bp .enableEpochsHandler .IsFlagEnabled (common .EquivalentMessagesFlag ) {
1019- err = bp .dataPool .Proofs ().CleanupProofsBehindNonce (shardID , noncesToPrevFinal )
1020- if err != nil {
1021- log .Warn ("failed to cleanup notarized proofs behind nonce" ,
1022- "nonce" , noncesToPrevFinal ,
1023- "shardID" , shardID ,
1024- "error" , err )
1025- }
1014+ err = bp .dataPool .Proofs ().CleanupProofsBehindNonce (shardID , noncesToPrevFinal )
1015+ if err != nil {
1016+ log .Warn ("%w: failed to cleanup notarized proofs behind nonce %d on shardID %d" ,
1017+ err , noncesToPrevFinal , shardID )
10261018 }
10271019}
10281020
0 commit comments