-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(internal/client) GossipEngine
implementation with dependency Network
and Syncing
interfaces
#4572
base: development
Are you sure you want to change the base?
Conversation
4d0f119
to
8d9a1bc
Compare
d40d5fa
to
26ec185
Compare
26ec185
to
ba5deda
Compare
GossipEngine
implementation with dependency Network
and Syncing
interfaces
) | ||
|
||
// Multiaddr type used in Gossamer | ||
type Multiaddr struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why Multiaddr wrapped in Multiaddr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will eventually need to implement some public methods on this type in future work (see substrate impl). Just laying the groundwork for now.
ge.stateMachine.BroadcastTopic(ge.notificationService, topic, force) | ||
} | ||
|
||
// Get data of valid, incoming messages for a topic (but might have expired meanwhile). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we are not using go semantc comments that start with the name of upcoming identifier declaration? In future it can be used for godoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They actually stopped enforcing this in the linter, but I'll update this one since I still try to adhere to the practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ended up updating a lot of comments based on this practice in bedf0f8.
|
||
// MultiaddrPeerId is the address of a node, including its identity. | ||
// This struct represents a decoded version of a multiaddress that ends with "/p2p/<peerid>". | ||
type MultiaddrPeerId struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have separate package config for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's where it's found in substrate (link). There will be more config associated types added to this package in future work.
Changes
GossipEngine
implementation.service.NetworkPeers
,service.NetworkEventStream
,sync.SyncEventStream
, andservice.NetworkBlock
interfaces.gossip.Network
andgossip.Syncing
interfaces as dependencies forGossipEngine
.Network
andSyncing
implementations.Tests
go test -tags integration github.com/ChainSafe/gossamer
Issues
closes #3629