les: drop dead tester code

This commit is contained in:
Péter Szilágyi 2018-02-10 14:30:30 +02:00
parent 4b567839b6
commit 6e78ee396c
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D

View file

@ -17,7 +17,6 @@
package les package les
import ( import (
"bytes"
"encoding/binary" "encoding/binary"
"math/big" "math/big"
"math/rand" "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}) 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. // Tests that block headers can be retrieved from a remote chain based on user queries.
func TestGetBlockHeadersLes1(t *testing.T) { testGetBlockHeaders(t, 1) } func TestGetBlockHeadersLes1(t *testing.T) { testGetBlockHeaders(t, 1) }
func TestGetBlockHeadersLes2(t *testing.T) { testGetBlockHeaders(t, 2) } func TestGetBlockHeadersLes2(t *testing.T) { testGetBlockHeaders(t, 2) }