Simon cec32cb996
Append Dynamic Addinng Trusted Peer Apis (#12531)
* Append Dynamic Addinng Trusted Peer Apis

* Append unit tests for Dynamic Addinng Trusted Peer Apis

* Update beacon-chain/p2p/peers/peerdata/store.go

* Update beacon-chain/p2p/peers/peerdata/store_test.go

* Update beacon-chain/p2p/peers/peerdata/store_test.go

* Update beacon-chain/p2p/peers/peerdata/store_test.go

* Update beacon-chain/p2p/peers/status.go

* Update beacon-chain/p2p/peers/status_test.go

* Update beacon-chain/p2p/peers/status_test.go

* Update beacon-chain/rpc/eth/node/handlers.go

* Update beacon-chain/rpc/eth/node/handlers.go

* Update beacon-chain/rpc/eth/node/handlers.go

* Update beacon-chain/rpc/eth/node/handlers.go

* Move trusted peer apis from rpc/eth/v1/node to rpc/prysm/node; move peersToWatch into ensurePeerConnections function;

* Update beacon-chain/rpc/prysm/node/server.go

* Update beacon-chain/rpc/prysm/node/server.go

* fix go lint problem

* p2p/watch_peers.go: trusted peer makes AddrInfo structure by itself instead of using MakePeer().

p2p/service.go: add connectWithAllTrustedPeers function, before connectWithPeer, add trusted peer info into peer status.

p2p/peers/status.go: trusted peers are not included, when pruning outdated and disconnected peers.

* use readlock for GetTrustedPeers and IsTrustedPeers

---------

Co-authored-by: simon <sunminghui2@huawei.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2023-07-11 09:26:08 +00:00
..
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-05-22 19:18:13 +08:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2021-08-19 13:00:57 -05:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2020-12-11 18:40:56 -08:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-24 12:36:10 +08:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00
2023-03-17 18:52:56 +00:00