Possible error in gossiper_test.go::getOuts

Possible error in gossiper_test.go::getOuts

by Morten Borup Petersen -
Number of replies: 2

i think there might be an error in the getOuts function of gossiper_test.go:

The line:
> chanOut := n.gossiper.Watch(ctx, true)

will return the channel for incoming packets and not outgoing packets.
If we compare with the getIns function, the exact same channel (n.gossiper.Watch(ctx, true)) is requested.
My test pass if the channel is set to
> chanOut := n.gossiper.Watch(ctx, false)

- Morten

In reply to Morten Borup Petersen

Re: Possible error in gossiper_test.go::getOuts

by Stratos Triantafyllou -

I agree, it looks like a mistake. Note also the implementation of the `Watch` function, which points to `inWatcher` when it gets true as input, and `outWatcher` when false.

In reply to Morten Borup Petersen

Re: Possible error in gossiper_test.go::getOuts

by Pasindu Nivanthaka Tennage -

Thank you for the question.

Yes you are correct. chanOut should use false. We will correct this mistake and push the changes to student repos.

Regards
TAs