File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -263,15 +263,25 @@ async fn main() -> Result<()> {
263263 let storage = Arc :: new ( storage) ;
264264 info ! ( "Distributed storage initialized" ) ;
265265
266- if args. bootstrap . is_empty ( ) {
267- warn ! ( "No bootstrap peers configured. This node will act as a bootnode (waiting for peers to connect)." ) ;
268- }
269- let p2p_config = P2PConfig :: default ( )
266+ // Build P2P config - use defaults and add any extra bootstrap peers from CLI
267+ let mut p2p_config = P2PConfig :: default ( )
270268 . with_listen_addr ( & args. listen_addr )
271- . with_bootstrap_peers ( args. bootstrap . clone ( ) )
272269 . with_netuid ( args. netuid )
273270 . with_min_stake ( 10_000_000_000_000 ) ; // 10000 TAO
274271
272+ // Add CLI bootstrap peers to defaults (don't replace)
273+ for peer in & args. bootstrap {
274+ if !p2p_config. bootstrap_peers . contains ( peer) {
275+ p2p_config. bootstrap_peers . push ( peer. clone ( ) ) ;
276+ }
277+ }
278+
279+ if p2p_config. bootstrap_peers . is_empty ( ) {
280+ warn ! ( "No bootstrap peers configured. This node will act as a bootnode (waiting for peers to connect)." ) ;
281+ } else {
282+ info ! ( "Bootstrap peers: {:?}" , p2p_config. bootstrap_peers) ;
283+ }
284+
275285 // Initialize validator set (ourselves first)
276286 let validator_set = Arc :: new ( ValidatorSet :: new ( keypair. clone ( ) , p2p_config. min_stake ) ) ;
277287 info ! ( "P2P network config initialized" ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ services:
2323 # --bootstrap /ip4/<BOOTNODE_IP>/tcp/8090/p2p/<PEER_ID>
2424 # ==========================================================================
2525 bootnode :
26- image : ghcr.io/platformnetwork/ platform-bootnode:latest
26+ image : platform-bootnode:latest
2727 container_name : platform-bootnode
2828 restart : unless-stopped
2929
You can’t perform that action at this time.
0 commit comments