accounting: allow up to 100 completed transfers in the accounting list

This fixes the core/transfers rc so it shows items again.
This commit is contained in:
Nick Craig-Wood
2019-10-16 20:11:11 +01:00
parent b002ff8d54
commit d40972bf1a
4 changed files with 64 additions and 7 deletions

View File

@ -102,6 +102,8 @@ func (tr *Transfer) Done(err error) {
}
// Signal done with accounting
acc.Done()
// free the account since we may keep the transfer
acc = nil
}
tr.mu.Lock()
@ -113,7 +115,7 @@ func (tr *Transfer) Done(err error) {
} else {
tr.stats.DoneTransferring(tr.remote, err == nil)
}
tr.stats.RemoveTransfer(tr)
tr.stats.PruneTransfers()
}
// Reset allows to switch the Account to another transfer method.