mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 23:25:22 +00:00
core: fix NetworkFee calculation
Add doesn't change the variable state. Thanks to GolangCI for catching this.
This commit is contained in:
parent
7bea6e043e
commit
00d199ed85
1 changed files with 2 additions and 2 deletions
|
@ -1053,14 +1053,14 @@ func (bc *Blockchain) NetworkFee(t *transaction.Transaction) util.Fixed8 {
|
|||
}
|
||||
for i := range refs {
|
||||
if refs[i].Out.AssetID == UtilityTokenID() {
|
||||
inputAmount.Add(refs[i].Out.Amount)
|
||||
inputAmount = inputAmount.Add(refs[i].Out.Amount)
|
||||
}
|
||||
}
|
||||
|
||||
outputAmount := util.Fixed8FromInt64(0)
|
||||
for _, txOutput := range t.Outputs {
|
||||
if txOutput.AssetID == UtilityTokenID() {
|
||||
outputAmount.Add(txOutput.Amount)
|
||||
outputAmount = outputAmount.Add(txOutput.Amount)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue