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

accounting: copy big numbers in various places (#1329)

parent 8d39abec
......@@ -105,9 +105,9 @@ func NewAccounting(
) (*Accounting, error) {
return &Accounting{
accountingPeers: make(map[string]*accountingPeer),
paymentThreshold: PaymentThreshold,
paymentTolerance: PaymentTolerance,
earlyPayment: EarlyPayment,
paymentThreshold: new(big.Int).Set(PaymentThreshold),
paymentTolerance: new(big.Int).Set(PaymentTolerance),
earlyPayment: new(big.Int).Set(EarlyPayment),
logger: Logger,
store: Store,
settlement: Settlement,
......@@ -448,7 +448,7 @@ func (a *Accounting) getAccountingPeer(peer swarm.Address) (*accountingPeer, err
peerData = &accountingPeer{
reservedBalance: big.NewInt(0),
// initially assume the peer has the same threshold as us
paymentThreshold: a.paymentThreshold,
paymentThreshold: new(big.Int).Set(a.paymentThreshold),
}
a.accountingPeers[peer.String()] = peerData
}
......
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