Commit 3c321e9d authored by Ralph Pichler's avatar Ralph Pichler Committed by GitHub

include peer information in reserve error (#743)

parent cce61d3c
......@@ -124,7 +124,7 @@ func (ps *PushSync) handler(ctx context.Context, p p2p.Peer, stream p2p.Stream)
receiptPrice := ps.pricer.PeerPrice(peer, chunk.Address())
err = ps.accounting.Reserve(peer, receiptPrice)
if err != nil {
return err
return fmt.Errorf("reserve balance for peer %s: %w", peer.String(), err)
}
defer ps.accounting.Release(peer, receiptPrice)
......@@ -237,7 +237,7 @@ func (ps *PushSync) PushChunkToClosest(ctx context.Context, ch swarm.Chunk) (*Re
receiptPrice := ps.pricer.PeerPrice(peer, ch.Address())
err = ps.accounting.Reserve(peer, receiptPrice)
if err != nil {
return nil, err
return nil, fmt.Errorf("reserve balance for peer %s: %w", peer.String(), err)
}
defer ps.accounting.Release(peer, receiptPrice)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment