mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm/network: remove unused vars from testHandshake
This commit is contained in:
parent
4021698d4e
commit
9a847448c5
3 changed files with 3 additions and 18 deletions
|
|
@ -292,7 +292,7 @@ func TestBzzFeed(t *testing.T) {
|
|||
if resp.StatusCode != http.StatusOK {
|
||||
t.Fatalf("err %s", resp.Status)
|
||||
}
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
b, err = ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,18 +153,7 @@ func newBzzHandshakeTester(t *testing.T, n int, addr *BzzAddr, lightNode bool) *
|
|||
|
||||
// should test handshakes in one exchange? parallelisation
|
||||
func (s *bzzTester) testHandshake(lhs, rhs *HandshakeMsg, disconnects ...*p2ptest.Disconnect) error {
|
||||
//TODO: peers is not used. fix test.
|
||||
var peers []enode.ID
|
||||
id := rhs.Addr.ID()
|
||||
if len(disconnects) > 0 {
|
||||
for _, d := range disconnects {
|
||||
peers = append(peers, d.Peer)
|
||||
}
|
||||
} else {
|
||||
peers = []enode.ID{id}
|
||||
}
|
||||
|
||||
if err := s.TestExchanges(HandshakeMsgExchange(lhs, rhs, id)...); err != nil {
|
||||
if err := s.TestExchanges(HandshakeMsgExchange(lhs, rhs, rhs.Addr.ID())...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,11 +92,7 @@ func (u *ID) binaryGet(serializedData []byte) error {
|
|||
}
|
||||
cursor += feedLength
|
||||
|
||||
if err := u.Epoch.UnmarshalBinary(serializedData[cursor : cursor+lookup.EpochLength]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return u.Epoch.UnmarshalBinary(serializedData[cursor : cursor+lookup.EpochLength])
|
||||
}
|
||||
|
||||
// FromValues deserializes this instance from a string key-value store
|
||||
|
|
|
|||
Loading…
Reference in a new issue