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