Commit f9260447 authored by Ralph Pichler's avatar Ralph Pichler Committed by GitHub

use peers payment threshold in final reserve check (#989)

parent ae312818
......@@ -203,7 +203,7 @@ func (a *Accounting) Reserve(ctx context.Context, peer swarm.Address, price uint
// if expectedDebt would still exceed the paymentThreshold at this point block this request
// this can happen if there is a large number of concurrent requests to the same peer
if increasedExpectedDebt > int64(a.paymentThreshold) {
if increasedExpectedDebt > int64(accountingPeer.paymentThreshold) {
a.metrics.AccountingBlocksCount.Inc()
return ErrOverdraft
}
......
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