swarm/network/stream: remove dead code (#1422)

* swarm/network/stream: remove dead code

* swarm/network/stream: remove HandoverProof
This commit is contained in:
Anton Evangelatov
2019-06-05 12:59:46 +02:00
committed by GitHub
parent 6d0902da3c
commit bd1887189c
7 changed files with 23 additions and 126 deletions

View File

@@ -314,10 +314,6 @@ func (c *testExternalClient) NeedData(ctx context.Context, hash []byte) func(con
return wait
}
func (c *testExternalClient) BatchDone(Stream, uint64, []byte, []byte) func() (*TakeoverProof, error) {
return nil
}
func (c *testExternalClient) Close() {}
type testExternalServer struct {
@@ -343,7 +339,7 @@ func (s *testExternalServer) SessionIndex() (uint64, error) {
return s.sessionAt, nil
}
func (s *testExternalServer) SetNextBatch(from uint64, to uint64) ([]byte, uint64, uint64, *HandoverProof, error) {
func (s *testExternalServer) SetNextBatch(from uint64, to uint64) ([]byte, uint64, uint64, error) {
if to > s.maxKeys {
to = s.maxKeys
}
@@ -351,7 +347,7 @@ func (s *testExternalServer) SetNextBatch(from uint64, to uint64) ([]byte, uint6
for i := from; i <= to; i++ {
s.keyFunc(b[(i-from)*HashSize:(i-from+1)*HashSize], i)
}
return b, from, to, nil, nil
return b, from, to, nil
}
func (s *testExternalServer) GetData(context.Context, []byte) ([]byte, error) {