Skip to content

Commit 01455b2

Browse files
committed
Revert "fix proofs pool init"
This reverts commit 782078f.
1 parent 74789b1 commit 01455b2

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

process/block/baseProcess.go

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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

testscommon/dataRetriever/poolFactory.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ func CreatePoolsHolderWithTxPool(txPool dataRetriever.ShardedDataCacherNotifier)
225225
heartbeatPool, err := storageunit.NewCache(cacherConfig)
226226
panicIfError("CreatePoolsHolderWithTxPool", err)
227227

228-
proofsPool := proofscache.NewProofsPool()
229-
230228
currentBlockTransactions := dataPool.NewCurrentBlockTransactionsPool()
231229
currentEpochValidatorInfo := dataPool.NewCurrentEpochValidatorInfoPool()
232230
dataPoolArgs := dataPool.DataPoolArgs{
@@ -244,7 +242,6 @@ func CreatePoolsHolderWithTxPool(txPool dataRetriever.ShardedDataCacherNotifier)
244242
PeerAuthentications: peerAuthPool,
245243
Heartbeats: heartbeatPool,
246244
ValidatorsInfo: validatorsInfo,
247-
Proofs: proofsPool,
248245
}
249246
holder, err := dataPool.NewDataPool(dataPoolArgs)
250247
panicIfError("CreatePoolsHolderWithTxPool", err)

0 commit comments

Comments
 (0)