diff options
Diffstat (limited to 'swarm/network/protocol_test.go')
-rw-r--r-- | swarm/network/protocol_test.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/swarm/network/protocol_test.go b/swarm/network/protocol_test.go index 53ceda744..58477a7b8 100644 --- a/swarm/network/protocol_test.go +++ b/swarm/network/protocol_test.go @@ -20,7 +20,6 @@ import ( "flag" "fmt" "os" - "sync" "testing" "github.com/ethereum/go-ethereum/log" @@ -44,31 +43,7 @@ func init() { log.Root().SetHandler(log.LvlFilterHandler(log.Lvl(*loglevel), log.StreamHandler(os.Stderr, log.TerminalFormat(true)))) } -type testStore struct { - sync.Mutex - - values map[string][]byte -} - -func (t *testStore) Load(key string) ([]byte, error) { - t.Lock() - defer t.Unlock() - v, ok := t.values[key] - if !ok { - return nil, fmt.Errorf("key not found: %s", key) - } - return v, nil -} - -func (t *testStore) Save(key string, v []byte) error { - t.Lock() - defer t.Unlock() - t.values[key] = v - return nil -} - func HandshakeMsgExchange(lhs, rhs *HandshakeMsg, id enode.ID) []p2ptest.Exchange { - return []p2ptest.Exchange{ { Expects: []p2ptest.Expect{ |