paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

Accept Multiaddr in NetworkService::add_reserved_peer instead of String #8834

Closed kpp closed 2 years ago

kpp commented 3 years ago

https://github.com/paritytech/substrate/blob/8d02bb0bfc6136f6a3c805db19f51e43090a7cd4/client/network/src/service.rs#L987

by tomaka:

Historical artifact 😬 It's not actually a PeerId that is passed, but a multiaddr with a /p2p/... at the end E.g. /ip4/34.91.97.19/tcp/30333/p2p/12D3KooWD6wC88atMMyVeP6ZKg9sK7QmUL8x8m1RxMW8rhv2vWyg I think the type should be Multiaddr or MultiaddrWithPeerId

stale[bot] commented 3 years ago

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

guzzit commented 2 years ago

Hi @kpp and @tomaka, can I attempt this?

bkchr commented 2 years ago

@guzzit yes you can take this.

guzzit commented 2 years ago

Thanks @bkchr . This means I'll also change the type in the system_add_reserved_peer method right?

https://github.com/paritytech/substrate/blob/48bcb390740638cb2aa83983cb4c3b0fb0f85db7/client/rpc/src/system/mod.rs#L141

kpp commented 2 years ago

Yes