Homework 1 forum

func (g *Gossiper) GetNodes() []string VS func (g *Gossiper) GetDirectNodes() []string

 
Picture of Pasindu Nivanthaka Tennage
Re: func (g *Gossiper) GetNodes() []string VS func (g *Gossiper) GetDirectNodes() []string
by Pasindu Nivanthaka Tennage - Friday, 23 October 2020, 15:44
 

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