Skip to content

Commit

Permalink
Add support SmartNode for progpow
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolin1579 committed Aug 22, 2024
1 parent 09aeede commit bce5f04
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Miningcore/Blockchain/Progpow/ProgpowJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,14 @@ public virtual void Init(BlockTemplate blockTemplate, string jobId,
}
}

if(coin.HasSmartNodes)
{
if(masterNodeParameters.Extra?.ContainsKey("smartnode") == true)
{
masterNodeParameters.Masternode = JToken.FromObject(masterNodeParameters.Extra["smartnode"]);
}
}

if(!string.IsNullOrEmpty(masterNodeParameters.CoinbasePayload))
{
txVersion = 3;
Expand All @@ -240,7 +248,7 @@ public virtual void Init(BlockTemplate blockTemplate, string jobId,
developerParameters = BlockTemplate.Extra.SafeExtensionDataAs<DeveloperBlockTemplateExtra>();

if (coin.HasFounderFee)
{
{
founderParameters = BlockTemplate.Extra.SafeExtensionDataAs<FounderBlockTemplateExtra>();

if(coin.HasDevFee)
Expand All @@ -250,7 +258,7 @@ public virtual void Init(BlockTemplate blockTemplate, string jobId,
founderParameters.Founder = JToken.FromObject(founderParameters.Extra["devfee"]);
}
}
}
}

if (coin.HasMinerDevFund)
minerDevFundParameters = BlockTemplate.Extra.SafeExtensionDataAs<MinerDevFundTemplateExtra>("coinbasetxn", "minerdevfund");
Expand Down

0 comments on commit bce5f04

Please sign in to comment.