fibercrypto / fibercrypto/skycoin

Peerlist: disambiguate pex "seen" value

Open
#2,000 0 comments 0 reactions 0 assignees View on GitHub
networking
Dominant language
Go
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The peerlist peer field "Seen" has an overloaded meaning.

There needs to be multiple fields for different concepts:

- Seen via PEX peer sharing
- Seen by establishing a connection
- Seen by successfully introducing
- Seen by last message received

and these fields should be updated appropriately.

We may need further data on whether or not the introduction failed because of a soft error (e.g. max outgoing connections reached), or a hard error (e.g. different blockchain pubkey), since for a soft error the client is still valid but for a hard error the client should be dropped. This logic might be separate from the "Seen" concepts, and is currently handled in the `daemon.onDisconnectEvent` method, but could be improved.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.