Hello,
I was wondering, what is the difference between those two functions:
func (g *Gossiper) GetNodes() []string
func (g *Gossiper) GetDirectNodes() []string
Best regards,
Bastien
Hello,
I was wondering, what is the difference between those two functions:
func (g *Gossiper) GetNodes() []string
func (g *Gossiper) GetDirectNodes() []string
Best regards,
Bastien
The way I understood it is GetNodes returns the addresses of known peers i.e. strings of format IP:PORT and GetDirectNodes returns the identifiers/names of nodes it has heard of thanks to rumors (basically all nodes it has a NextHop to).
Hello
Thank you for the question.
func (g *Gossiper) GetNodes() []string has the same definition we have in HW0; so I assume it is clear.
func (g *Gossiper) GetDirectNodes() []string should return the set of nodes whose routes are known; for example if node A knows that it can send a private message to C via B, then C should be returned in this method.
Regards
Follow the pulses of EPFL on social networks
© 2023 EPFL, all rights reserved