feat: store pubkey and peerid in peerstore

This commit is contained in:
Winter-Soren
2025-05-29 20:07:48 +05:30
parent 67ca1d7769
commit 30b5811d39
5 changed files with 35 additions and 7 deletions

View File

@ -200,7 +200,9 @@ def new_swarm(
key_pair, noise_privkey=noise_key_pair.private_key
),
TProtocol(secio.ID): secio.Transport(key_pair),
TProtocol(PLAINTEXT_PROTOCOL_ID): InsecureTransport(key_pair),
TProtocol(PLAINTEXT_PROTOCOL_ID): InsecureTransport(
key_pair, peerstore=peerstore_opt
),
}
# Use given muxer preference if provided, otherwise use global default