mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
p2p/discover: fix some tests
This commit is contained in:
parent
0a4b314244
commit
fad3fe7853
2 changed files with 3 additions and 2 deletions
|
|
@ -116,11 +116,12 @@ func fillTable(tab *Table, nodes []*node, setLive bool) {
|
|||
for _, n := range nodes {
|
||||
if setLive {
|
||||
n.livenessChecks = 1
|
||||
n.isValidatedLive = true
|
||||
}
|
||||
tab.addSeenNode(n)
|
||||
}
|
||||
}
|
||||
7
|
||||
|
||||
type pingRecorder struct {
|
||||
mu sync.Mutex
|
||||
cond *sync.Cond
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ func TestUDPv4_findnode(t *testing.T) {
|
|||
n := wrapNode(enode.NewV4(&key.PublicKey, ip, 0, 2000))
|
||||
// Ensure half of table content isn't verified live yet.
|
||||
if i > numCandidates/2 {
|
||||
n.livenessChecks = 1
|
||||
n.isValidatedLive = true
|
||||
live[n.ID()] = true
|
||||
}
|
||||
nodes.push(n, numCandidates)
|
||||
|
|
|
|||
Loading…
Reference in a new issue