B3-Coin / B3-CoinV2

B3-CoinV2
MIT License
46 stars 64 forks source link

Nodes stuck in POS_ERROR #56

Closed AltFreq07 closed 6 years ago

AltFreq07 commented 6 years ago

I have noticed something wrong with a few of my nodes where I can not get them out of POS_ERROR state.

Usually when a node has a pose score > 0 but < 6 shutting the node down will allow it to move from ENABLED to EXPIRED and then REMOVED as expected. Once re syncing and starting up the FN again the state of the node becomes ENABLED with a pose score of 0.

The issue is when the node has a pose score > 6 and is in the POS_ERROR state that this method no longer works. When taking the node offline for over 48 hours the node will still be stuck in the POS_ERROR state even when it's not online. For example node "2604:a880:400:d0::37b:b006" has a pose score of 7 to my wallet but it has been offline for days and instead should be removed from the list.

I'm not very good at reading/writing c++ but I believe the issue may be in fundamentalnode.cpp with the void CFundamentalnode::Check() function. The function is checking if the node is in POSE_ERROR state and returning before it gets to check if its actually offline or not.

joshafest commented 6 years ago

This is due to connection exhaustion, You can increase maxconnections by adding a line maxconnections=250 In config file

AltFreq07 commented 6 years ago

Thanks joshafest I'll give that a go

AltFreq07 commented 6 years ago

This seems to have fixed the wallet I was using to monitor the nodes I have thanks for this tip