p2p/discover: add live flag in debug node

This commit is contained in:
Felix Lange 2024-04-18 11:46:05 +02:00
parent 1d896e8165
commit dc3f78bb81
2 changed files with 2 additions and 0 deletions

View file

@ -33,6 +33,7 @@ type BucketNode struct {
Node *enode.Node `json:"node"`
AddedAt time.Time `json:"added"`
Checks int `json:"checks"`
Live bool `json:"live"`
}
// node represents a host on the network.

View file

@ -167,6 +167,7 @@ func (tab *Table) Nodes() [][]BucketNode {
nodes[i][j] = BucketNode{
Node: n.Node,
Checks: int(n.livenessChecks),
Live: n.isValidatedLive,
AddedAt: n.addedAt,
}
}