diff options
author | Anton Evangelatov <anton.evangelatov@gmail.com> | 2018-11-21 21:36:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-21 21:36:56 +0800 |
commit | 4c181e4fb98bb88503cccd6147026b6c2b7b56f6 (patch) | |
tree | 48fa84c1fafd579b6df86e3585ed903b461e4734 /swarm/network | |
parent | 3fd87f219342ca97a6595263a2aa28bec65fee04 (diff) | |
download | dexon-4c181e4fb98bb88503cccd6147026b6c2b7b56f6.tar.gz dexon-4c181e4fb98bb88503cccd6147026b6c2b7b56f6.tar.zst dexon-4c181e4fb98bb88503cccd6147026b6c2b7b56f6.zip |
swarm/state: refactor InmemoryStore (#18143)
Diffstat (limited to 'swarm/network')
-rw-r--r-- | swarm/network/simulations/overlay.go | 4 | ||||
-rw-r--r-- | swarm/network/stream/delivery.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/swarm/network/simulations/overlay.go b/swarm/network/simulations/overlay.go index caf7ff1f2..284ae6398 100644 --- a/swarm/network/simulations/overlay.go +++ b/swarm/network/simulations/overlay.go @@ -64,12 +64,12 @@ func init() { type Simulation struct { mtx sync.Mutex - stores map[enode.ID]*state.InmemoryStore + stores map[enode.ID]state.Store } func NewSimulation() *Simulation { return &Simulation{ - stores: make(map[enode.ID]*state.InmemoryStore), + stores: make(map[enode.ID]state.Store), } } diff --git a/swarm/network/stream/delivery.go b/swarm/network/stream/delivery.go index 0109fbdef..64d754336 100644 --- a/swarm/network/stream/delivery.go +++ b/swarm/network/stream/delivery.go @@ -169,7 +169,7 @@ func (d *Delivery) handleRetrieveRequestMsg(ctx context.Context, sp *Peer, req * go func() { chunk, err := d.chunkStore.Get(ctx, req.Addr) if err != nil { - log.Warn("ChunkStore.Get can not retrieve chunk", "err", err) + log.Warn("ChunkStore.Get can not retrieve chunk", "peer", sp.ID().String(), "addr", req.Addr, "hopcount", req.HopCount, "err", err) return } if req.SkipCheck { |