Skip to content

Commit

Permalink
fix: set overlay in statestore and puller logs
Browse files Browse the repository at this point in the history
  • Loading branch information
istae committed Sep 18, 2023
1 parent a04109f commit 95009a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/node/statestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ func checkOverlay(storer storage.StateStorer, overlay swarm.Address) error {
var storedOverlay swarm.Address
err := storer.Get(noncedOverlayKey, &storedOverlay)
if err != nil {
return err
if !errors.Is(err, storage.ErrNotFound) {
return err
}
return storer.Put(noncedOverlayKey, overlay)
}

if !storedOverlay.Equal(overlay) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/puller/puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (p *Puller) syncPeer(ctx context.Context, peer *syncPeer, storageRadius uin
// cancel all bins
peer.gone()

p.logger.Debug("peer epoch change detected, resetting past synced intervals", "peer_address", peer.address)
p.logger.Debug("peer epoch change detected, resetting past synced intervals", "stored_epoch", storedEpoch, "new_epoch", epoch, "peer_address", peer.address)

err = p.resetPeerIntervals(peer.address)
if err != nil {
Expand Down

0 comments on commit 95009a7

Please sign in to comment.