Skip to content

Don't Panic! #539

Description

@utkarshg6

Don't Panic

The thing is if an originating node receives a gossip from the other Node saying, "Hey! Meet this guy.", and it turns out that we were already trying to build a neighborship with that guy, we're going to panic. 😱

We don't need to.

So, let's change the panic to an error log, here's your panic on node/src/neighborhood/overall_connection_status.rs:96 ==>

ifself.connection_stage != ConnectionStage::TcpConnectionEstablished{panic!("Can't update the stage from {:?} to {:?}",self.connection_stage,ConnectionStage::StageZero)};

Now, we can in fact split this into following cases:

Case 1: if self.connection_stage == StageZero it means that we already know this guy 😉

Case 2: if self.connection_stage == TcpConnectionEstablished it means, we're on the ideal track 👍

Case 3: Other cases, we should panic!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions