b6bcb32ecf
`overlay.(*Service).UpdateReputation()` takes a "reputationChanges" parameter, a slice of node events indicating whether we think the node's disqualification or suspension status is changing. This is necessary so that the overlay service can notify the nodeevents DB about these changes. In several cases, however, this list of events is not constructed correctly, because of missing information about the previous state. In most cases, this is because the node was offline, and the order limit creation functions (which usually obtain and return the prior reputation status) ignored that node. This change makes it so that all callers to `overlay.(*Service).UpdateReputation()` can be expected to provide a correct list of change events (as correct as feasible, given that we can't lock the node's information in the database during the entire operation). It ended up that there was only one caller we needed to worry about, and that was reputation.(*Service).ApplyAudit(). So the bulk of this change is teaching that function how to recognize when the prior reputation status was not filled in, and fill it in. Refs: https://github.com/storj/storj/issues/5464 Change-Id: I52ce385fc9c0ce3b283b998d517998e7f4ec8792 |
||
---|---|---|
.. | ||
audithistory_test.go | ||
audithistory.go | ||
benchmark_test.go | ||
calculations.go | ||
config.go | ||
db_test.go | ||
service_test.go | ||
service.go | ||
suspension_test.go | ||
writecache_service_test.go | ||
writecache_unit_test.go | ||
writecache.go |