Add Strain Hospice for graceful low-win strain retirement.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Archive failed epidemiology strains to museum hospice with SQLite persistence, operator/AI/court triggers, breeding and graft guards, topology museum nodes, and Seer plus oath ledger accountability.
This commit is contained in:
@@ -115,6 +115,15 @@ func (h *WSHub) ApproveFleetGraft(sourceID, targetID string) (strategy.GraftPoli
|
||||
if joinLane == "" {
|
||||
return strategy.GraftPolicy{}, fmt.Errorf("source agent has no tier-success join_lane")
|
||||
}
|
||||
sourceStrain := strategy.NormalizeStrainID(source.SpreadStrain)
|
||||
if sourceStrain == "" {
|
||||
sourceStrain = strategy.StrainFromSpreadLane(joinLane)
|
||||
}
|
||||
if inHospice, err := h.db.IsStrainInHospice(sourceStrain); err != nil {
|
||||
return strategy.GraftPolicy{}, err
|
||||
} else if inHospice {
|
||||
return strategy.GraftPolicy{}, fmt.Errorf("source strain is in hospice (museum archive)")
|
||||
}
|
||||
hr := h.AgentMiningHashrate(targetID)
|
||||
if hr <= 0 {
|
||||
hr = target.MiningHashrate
|
||||
|
||||
Reference in New Issue
Block a user