@@ -133,6 +133,7 @@ use crate::chainstate::burn::db::sortdb::SortitionDB;
133
133
use crate :: chainstate:: nakamoto:: NakamotoChainState ;
134
134
use crate :: chainstate:: stacks:: boot:: MINERS_NAME ;
135
135
use crate :: chainstate:: stacks:: db:: StacksChainState ;
136
+ use crate :: net:: connection:: ConnectionOptions ;
136
137
use crate :: net:: neighbors:: NeighborComms ;
137
138
use crate :: net:: p2p:: PeerNetwork ;
138
139
use crate :: net:: {
@@ -285,8 +286,9 @@ impl StackerDBs {
285
286
chainstate : & mut StacksChainState ,
286
287
sortdb : & SortitionDB ,
287
288
stacker_db_configs : HashMap < QualifiedContractIdentifier , StackerDBConfig > ,
288
- num_neighbors : u64 ,
289
+ connection_opts : & ConnectionOptions ,
289
290
) -> Result < HashMap < QualifiedContractIdentifier , StackerDBConfig > , net_error > {
291
+ let num_neighbors = connection_opts. num_neighbors ;
290
292
let existing_contract_ids = self . get_stackerdb_contract_ids ( ) ?;
291
293
let mut new_stackerdb_configs = HashMap :: new ( ) ;
292
294
let tip = SortitionDB :: get_canonical_burn_chain_tip ( sortdb. conn ( ) ) ?;
@@ -314,6 +316,10 @@ impl StackerDBs {
314
316
& sortdb,
315
317
& stackerdb_contract_id,
316
318
num_neighbors,
319
+ connection_opts
320
+ . stackerdb_hint_replicas
321
+ . get ( & stackerdb_contract_id)
322
+ . cloned ( ) ,
317
323
)
318
324
. unwrap_or_else ( |e| {
319
325
if matches ! ( e, net_error:: NoSuchStackerDB ( _) ) && stackerdb_contract_id. is_boot ( )
0 commit comments