Skip to content

Commit

Permalink
swarm/storage/mru: HOTFIX - fix panic in Handler.update (ethereum#17313)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeletier authored and gbalint committed Aug 7, 2018
1 parent eef65b2 commit 64a4e89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swarm/storage/mru/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ func (h *Handler) update(ctx context.Context, r *SignedResourceUpdate) (updateAd
log.Trace("resource update", "updateAddr", r.updateAddr, "lastperiod", r.period, "version", r.version, "data", chunk.SData, "multihash", r.multihash)

// update our resources map entry if the new update is older than the one we have, if we have it.
if rsrc != nil && r.period > rsrc.period || (rsrc.period == r.period && r.version > rsrc.version) {
if rsrc != nil && (r.period > rsrc.period || (rsrc.period == r.period && r.version > rsrc.version)) {
rsrc.period = r.period
rsrc.version = r.version
rsrc.data = make([]byte, len(r.data))
Expand Down

0 comments on commit 64a4e89

Please sign in to comment.