mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2025-04-02 13:50:11 +08:00
put signed peer record in address change event
This commit is contained in:
parent
fdc64dde88
commit
8173af76d1
@ -55,6 +55,11 @@ type UpdatedAddress struct {
|
|||||||
// If the event producer is not capable or producing diffs, the Diffs field will
|
// If the event producer is not capable or producing diffs, the Diffs field will
|
||||||
// be false, the Removed list will always be empty, and the Action for each
|
// be false, the Removed list will always be empty, and the Action for each
|
||||||
// UpdatedAddress in the Current list will be Unknown.
|
// UpdatedAddress in the Current list will be Unknown.
|
||||||
|
//
|
||||||
|
// In addition to the above, EvtLocalAddressesUpdated also contains the updated peer.PeerRecord
|
||||||
|
// for the Current set of listen addresses, wrapped in a record.Envelope and signed by the Host's private key.
|
||||||
|
// This record can be shared with other peers to inform them of our listen addresses in
|
||||||
|
// a secure and authenticated way.
|
||||||
type EvtLocalAddressesUpdated struct {
|
type EvtLocalAddressesUpdated struct {
|
||||||
|
|
||||||
// Diffs indicates whether this event contains a diff of the Host's previous
|
// Diffs indicates whether this event contains a diff of the Host's previous
|
||||||
@ -70,13 +75,8 @@ type EvtLocalAddressesUpdated struct {
|
|||||||
// Removed contains addresses that were removed from the Host.
|
// Removed contains addresses that were removed from the Host.
|
||||||
// This field is only set when Diffs == true.
|
// This field is only set when Diffs == true.
|
||||||
Removed []UpdatedAddress
|
Removed []UpdatedAddress
|
||||||
}
|
|
||||||
|
|
||||||
// EvtLocalPeerRoutingStateUpdated should be emitted when a new signed PeerRecord
|
// SignedPeerRecord contains the updated peer.PeerRecord for the Current set of listen addresses,
|
||||||
// for the local peer has been produced. This will happen whenever the set of listen
|
// wrapped in a record.Envelope and signed by the Host's private key.
|
||||||
// addresses changes.
|
SignedPeerRecord record.Envelope
|
||||||
type EvtLocalPeerRecordUpdated struct {
|
|
||||||
// Record contains the updated peer.PeerRecord, wrapped in a record.Envelope and
|
|
||||||
// signed by the Host's private key.
|
|
||||||
Record record.Envelope
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user