@@ -30,6 +30,7 @@ type dataPool struct {
3030 executedMiniBlocks storage.Cacher
3131 postProcessTransactions storage.Cacher
3232 directSentTransactions storage.Cacher
33+ quarantinedHeaders storage.Cacher
3334}
3435
3536// DataPoolArgs represents the data pool's constructor structure
@@ -52,6 +53,7 @@ type DataPoolArgs struct {
5253 ExecutedMiniBlocks storage.Cacher
5354 PostProcessTransactions storage.Cacher
5455 DirectSentTransactions storage.Cacher
56+ QuarantinedHeaders storage.Cacher
5557}
5658
5759// NewDataPool creates a data pools holder object
@@ -110,6 +112,9 @@ func NewDataPool(args DataPoolArgs) (*dataPool, error) {
110112 if check .IfNil (args .DirectSentTransactions ) {
111113 return nil , dataRetriever .ErrNilDirectSentTransactionsCache
112114 }
115+ if check .IfNil (args .QuarantinedHeaders ) {
116+ return nil , dataRetriever .ErrNilQuarantinedHeadersCache
117+ }
113118
114119 return & dataPool {
115120 transactions : args .Transactions ,
@@ -130,6 +135,7 @@ func NewDataPool(args DataPoolArgs) (*dataPool, error) {
130135 executedMiniBlocks : args .ExecutedMiniBlocks ,
131136 postProcessTransactions : args .PostProcessTransactions ,
132137 directSentTransactions : args .DirectSentTransactions ,
138+ quarantinedHeaders : args .QuarantinedHeaders ,
133139 }, nil
134140}
135141
@@ -223,6 +229,11 @@ func (dp *dataPool) PostProcessTransactions() storage.Cacher {
223229 return dp .postProcessTransactions
224230}
225231
232+ // QuarantinedHeaders returns the holder for quarantined header hashes (late-arriving equivalent proofs)
233+ func (dp * dataPool ) QuarantinedHeaders () storage.Cacher {
234+ return dp .quarantinedHeaders
235+ }
236+
226237// Close closes all the components
227238func (dp * dataPool ) Close () error {
228239 var lastError error
0 commit comments