-
Notifications
You must be signed in to change notification settings - Fork 132
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
} | ||
|
||
// Local implementation of [ValidatorContext]. | ||
type newtorkContext[H runtime.Hash, Hasher runtime.Hasher[H]] 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.
type newtorkContext[H runtime.Hash, Hasher runtime.Hasher[H]] struct { | |
type networkContext[H runtime.Hash, Hasher runtime.Hasher[H]] struct { |
// Requested broadcast to all peers. | ||
MessageIntentForcedBroadcast | ||
// Periodic rebroadcast of all messages to all peers. | ||
MessageIntentPeriodicReboradcast |
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.
MessageIntentPeriodicReboradcast | |
MessageIntentPeriodicRebroadcast |
propagate(notificationService, cg.protocol, messages, intent, cg.peers, cg.validator) | ||
} | ||
|
||
// Prune old or no longer relevant consensus messages. Provide a predicate for pruning, which returns false when the |
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.
Is the the comment about providing a predicate is outdated, since the method takes no parameters?
return r.intersects(RolesFull | RolesAuthority) | ||
} | ||
|
||
// Does this role represents a client that does not participates in the consensus? |
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.
Should this be:
// Does this role represents a client that does not participates in the consensus? | |
// Does this role represents a client that participates in the consensus? | |
```? |
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 #4522