@@ -3,7 +3,7 @@ use super::utxo_set_override::{set_genesis_utxo_commitment_from_config, set_init
3
3
use super :: { ctl:: Ctl , Consensus } ;
4
4
use crate :: { model:: stores:: U64Key , pipeline:: ProcessingCounters } ;
5
5
use itertools:: Itertools ;
6
- use kaspa_consensus_core:: config:: Config ;
6
+ use kaspa_consensus_core:: { config:: Config , mining_rules :: MiningRules } ;
7
7
use kaspa_consensus_notify:: root:: ConsensusNotificationRoot ;
8
8
use kaspa_consensusmanager:: { ConsensusFactory , ConsensusInstance , DynConsensusCtl , SessionLock } ;
9
9
use kaspa_core:: { debug, time:: unix_now, warn} ;
@@ -254,6 +254,7 @@ pub struct Factory {
254
254
counters : Arc < ProcessingCounters > ,
255
255
tx_script_cache_counters : Arc < TxScriptCacheCounters > ,
256
256
fd_budget : i32 ,
257
+ mining_rules : Arc < MiningRules > ,
257
258
}
258
259
259
260
impl Factory {
@@ -266,6 +267,7 @@ impl Factory {
266
267
counters : Arc < ProcessingCounters > ,
267
268
tx_script_cache_counters : Arc < TxScriptCacheCounters > ,
268
269
fd_budget : i32 ,
270
+ mining_rules : Arc < MiningRules > ,
269
271
) -> Self {
270
272
assert ! ( fd_budget > 0 , "fd_budget has to be positive" ) ;
271
273
let mut config = config. clone ( ) ;
@@ -283,6 +285,7 @@ impl Factory {
283
285
counters,
284
286
tx_script_cache_counters,
285
287
fd_budget,
288
+ mining_rules,
286
289
} ;
287
290
factory. delete_inactive_consensus_entries ( ) ;
288
291
factory
@@ -325,6 +328,7 @@ impl ConsensusFactory for Factory {
325
328
self . counters . clone ( ) ,
326
329
self . tx_script_cache_counters . clone ( ) ,
327
330
entry. creation_timestamp ,
331
+ self . mining_rules . clone ( ) ,
328
332
) ) ;
329
333
330
334
// We write the new active entry only once the instance was created successfully.
@@ -359,6 +363,7 @@ impl ConsensusFactory for Factory {
359
363
self . counters . clone ( ) ,
360
364
self . tx_script_cache_counters . clone ( ) ,
361
365
entry. creation_timestamp ,
366
+ self . mining_rules . clone ( ) ,
362
367
) ) ;
363
368
364
369
( ConsensusInstance :: new ( session_lock, consensus. clone ( ) ) , Arc :: new ( Ctl :: new ( self . management_store . clone ( ) , db, consensus) ) )
0 commit comments