[#365] settlement/basic: Use big.Int constructor for unification

Check if `new(big.Int)` will be efficient later and replace
all `big.NewInt()` in code or leave it as it is.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-02-03 15:07:37 +03:00 committed by Alex Vanin
parent 6a9a2b5d04
commit 3775d61ccb
4 changed files with 8 additions and 8 deletions

View file

@ -17,12 +17,12 @@ func (t *NodeSizeTable) Put(id []byte, avg uint64) {
}
func (t *NodeSizeTable) Total() *big.Int {
return new(big.Int).SetUint64(t.total)
return big.NewInt(0).SetUint64(t.total)
}
func (t *NodeSizeTable) Iterate(f func([]byte, *big.Int)) {
for k, v := range t.prices {
n := new(big.Int).SetUint64(v)
n := big.NewInt(0).SetUint64(v)
f([]byte(k), n)
}
}