mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
les: drop dead tester code
This commit is contained in:
parent
4b567839b6
commit
6e78ee396c
1 changed files with 0 additions and 19 deletions
|
|
@ -17,7 +17,6 @@
|
|||
package les
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
|
|
@ -46,24 +45,6 @@ func expectResponse(r p2p.MsgReader, msgcode, reqID, bv uint64, data interface{}
|
|||
return p2p.ExpectMsg(r, msgcode, resp{reqID, bv, data})
|
||||
}
|
||||
|
||||
func testCheckProof(t *testing.T, exp *light.NodeSet, got light.NodeList) {
|
||||
if exp.KeyCount() > len(got) {
|
||||
t.Errorf("proof has fewer nodes than expected")
|
||||
return
|
||||
}
|
||||
if exp.KeyCount() < len(got) {
|
||||
t.Errorf("proof has more nodes than expected")
|
||||
return
|
||||
}
|
||||
for _, node := range got {
|
||||
n, _ := exp.Get(crypto.Keccak256(node))
|
||||
if !bytes.Equal(n, node) {
|
||||
t.Errorf("proof contents mismatch")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Tests that block headers can be retrieved from a remote chain based on user queries.
|
||||
func TestGetBlockHeadersLes1(t *testing.T) { testGetBlockHeaders(t, 1) }
|
||||
func TestGetBlockHeadersLes2(t *testing.T) { testGetBlockHeaders(t, 2) }
|
||||
|
|
|
|||
Loading…
Reference in a new issue