les: remove redundant type specifiers (#19091)
This commit is contained in:
parent
7d881e45bd
commit
badaf43019
@ -14,13 +14,10 @@ import (
|
||||
)
|
||||
|
||||
func TestFetcherULCPeerSelector(t *testing.T) {
|
||||
|
||||
var (
|
||||
id1 enode.ID = newNodeID(t).ID()
|
||||
id2 enode.ID = newNodeID(t).ID()
|
||||
id3 enode.ID = newNodeID(t).ID()
|
||||
id4 enode.ID = newNodeID(t).ID()
|
||||
)
|
||||
id1 := newNodeID(t).ID()
|
||||
id2 := newNodeID(t).ID()
|
||||
id3 := newNodeID(t).ID()
|
||||
id4 := newNodeID(t).ID()
|
||||
|
||||
ftn1 := &fetcherTreeNode{
|
||||
hash: common.HexToHash("1"),
|
||||
|
@ -7,7 +7,6 @@ import (
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/les/flowcontrol"
|
||||
"github.com/ethereum/go-ethereum/p2p"
|
||||
"github.com/ethereum/go-ethereum/p2p/enode"
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
)
|
||||
|
||||
@ -25,8 +24,7 @@ var (
|
||||
|
||||
//ulc connects to trusted peer and send announceType=announceTypeSigned
|
||||
func TestPeerHandshakeSetAnnounceTypeToAnnounceTypeSignedForTrustedPeer(t *testing.T) {
|
||||
|
||||
var id enode.ID = newNodeID(t).ID()
|
||||
id := newNodeID(t).ID()
|
||||
|
||||
//peer to connect(on ulc side)
|
||||
p := peer{
|
||||
@ -74,7 +72,7 @@ func TestPeerHandshakeSetAnnounceTypeToAnnounceTypeSignedForTrustedPeer(t *testi
|
||||
}
|
||||
|
||||
func TestPeerHandshakeAnnounceTypeSignedForTrustedPeersPeerNotInTrusted(t *testing.T) {
|
||||
var id enode.ID = newNodeID(t).ID()
|
||||
id := newNodeID(t).ID()
|
||||
p := peer{
|
||||
Peer: p2p.NewPeer(id, "test peer", []p2p.Cap{}),
|
||||
version: protocol_version,
|
||||
@ -118,7 +116,7 @@ func TestPeerHandshakeAnnounceTypeSignedForTrustedPeersPeerNotInTrusted(t *testi
|
||||
}
|
||||
|
||||
func TestPeerHandshakeDefaultAllRequests(t *testing.T) {
|
||||
var id enode.ID = newNodeID(t).ID()
|
||||
id := newNodeID(t).ID()
|
||||
|
||||
s := generateLesServer()
|
||||
|
||||
@ -147,7 +145,7 @@ func TestPeerHandshakeDefaultAllRequests(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPeerHandshakeServerSendOnlyAnnounceRequestsHeaders(t *testing.T) {
|
||||
var id enode.ID = newNodeID(t).ID()
|
||||
id := newNodeID(t).ID()
|
||||
|
||||
s := generateLesServer()
|
||||
s.onlyAnnounce = true
|
||||
@ -181,7 +179,7 @@ func TestPeerHandshakeServerSendOnlyAnnounceRequestsHeaders(t *testing.T) {
|
||||
}
|
||||
}
|
||||
func TestPeerHandshakeClientReceiveOnlyAnnounceRequestsHeaders(t *testing.T) {
|
||||
var id enode.ID = newNodeID(t).ID()
|
||||
id := newNodeID(t).ID()
|
||||
|
||||
p := peer{
|
||||
Peer: p2p.NewPeer(id, "test peer", []p2p.Cap{}),
|
||||
@ -212,7 +210,7 @@ func TestPeerHandshakeClientReceiveOnlyAnnounceRequestsHeaders(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPeerHandshakeClientReturnErrorOnUselessPeer(t *testing.T) {
|
||||
var id enode.ID = newNodeID(t).ID()
|
||||
id := newNodeID(t).ID()
|
||||
|
||||
p := peer{
|
||||
Peer: p2p.NewPeer(id, "test peer", []p2p.Cap{}),
|
||||
|
Loading…
Reference in New Issue
Block a user