mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-11 06:23:47 +00:00
Merge branch 'ethereum:master' into portal
This commit is contained in:
commit
ab764c159d
2 changed files with 4 additions and 4 deletions
|
|
@ -291,8 +291,8 @@ func writeAuthors(files []string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Write sorted list of authors back to the file.
|
// Write sorted list of authors back to the file.
|
||||||
slices.SortFunc(list, func(a, b string) bool {
|
slices.SortFunc(list, func(a, b string) int {
|
||||||
return strings.ToLower(a) < strings.ToLower(b)
|
return strings.Compare(strings.ToLower(a), strings.ToLower(b))
|
||||||
})
|
})
|
||||||
content := new(bytes.Buffer)
|
content := new(bytes.Buffer)
|
||||||
content.WriteString(authorsFileHeader)
|
content.WriteString(authorsFileHeader)
|
||||||
|
|
|
||||||
|
|
@ -282,12 +282,12 @@ func TestUDPv4_findnode(t *testing.T) {
|
||||||
waitNeighbors := func(want []*node) {
|
waitNeighbors := func(want []*node) {
|
||||||
test.waitPacketOut(func(p *v4wire.Neighbors, to *net.UDPAddr, hash []byte) {
|
test.waitPacketOut(func(p *v4wire.Neighbors, to *net.UDPAddr, hash []byte) {
|
||||||
if len(p.Nodes) != len(want) {
|
if len(p.Nodes) != len(want) {
|
||||||
t.Errorf("wrong number of results: got %d, want %d", len(p.Nodes), bucketSize)
|
t.Errorf("wrong number of results: got %d, want %d", len(p.Nodes), len(want))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for i, n := range p.Nodes {
|
for i, n := range p.Nodes {
|
||||||
if n.ID.ID() != want[i].ID() {
|
if n.ID.ID() != want[i].ID() {
|
||||||
t.Errorf("result mismatch at %d:\n got: %v\n want: %v", i, n, expected.entries[i])
|
t.Errorf("result mismatch at %d:\n got: %v\n want: %v", i, n, expected.entries[i])
|
||||||
}
|
}
|
||||||
if !live[n.ID.ID()] {
|
if !live[n.ID.ID()] {
|
||||||
t.Errorf("result includes dead Node %v", n.ID.ID())
|
t.Errorf("result includes dead Node %v", n.ID.ID())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue