hyperledger-labs / Scorex

Scorex 2.0 Core
Apache License 2.0
544 stars 115 forks source link

"lastSeen" has different semantics for active connections and database peer #378

Closed kushti closed 4 years ago

kushti commented 4 years ago

For connections in NetworkController, lastSeen (in peer info) contains time of last message got from a peer. In opposite, lastSeen in peer info in PeerDatabase implementation (InMemoryPeerDatabase) contains time when last connection with a peer was established (or 0 if never).

It makes sense to have two fields for these two different use cases.

kushti commented 4 years ago

Fixed