Change how default consensus is picked
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2024-04-23 18:39:31 +02:00
parent d71446b00f
commit bbbf1f2638
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -151,7 +151,15 @@ func (c *Consensus) verify() bool {
if c.PoolName == "default" {
//p2pool changed consensus config to use default instead of original value
c.PoolName = ConsensusDefault.PoolName
if ConsensusDefault.NetworkType == c.NetworkType &&
ConsensusDefault.PoolPassword == c.PoolPassword &&
ConsensusDefault.TargetBlockTime == c.TargetBlockTime &&
ConsensusDefault.MinimumDifficulty == c.MinimumDifficulty &&
ConsensusDefault.ChainWindowSize == c.ChainWindowSize &&
ConsensusDefault.UnclePenalty == c.UnclePenalty &&
ConsensusDefault.Extra == c.Extra {
c.PoolName = ConsensusDefault.PoolName
}
}
if len(c.PoolName) > 128 {