forked from Qortal/qortal
Keep track of successes or failures for a particular arbitrary peer / signature combination.
This can help to inform decisions on data retention (although there is no deletion yet).
This commit is contained in:
parent
b42674ac06
commit
5e0af26c27
@ -301,6 +301,19 @@ public class ArbitraryDataFileManager {
|
||||
}
|
||||
}
|
||||
|
||||
// Keep track of the success or failure
|
||||
arbitraryPeerData.markAsAttempted();
|
||||
if (success) {
|
||||
arbitraryPeerData.markAsRetrieved();
|
||||
arbitraryPeerData.incrementSuccesses();
|
||||
}
|
||||
else {
|
||||
arbitraryPeerData.incrementFailures();
|
||||
}
|
||||
repository.discardChanges();
|
||||
repository.getArbitraryRepository().save(arbitraryPeerData);
|
||||
repository.saveChanges();
|
||||
|
||||
return success;
|
||||
|
||||
} catch (DataException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user