Skip to content

Commit

Permalink
Added fee for OP_RETURN for x42. (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisAMenace authored May 28, 2020
1 parent b83d16f commit 80a668f
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 331 deletions.
4 changes: 4 additions & 0 deletions src/Networks/x42/x42/Networks/Consensus/x42Consensus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ public class x42Consensus : IConsensus
/// <inheritdoc />
public Money LastProofOfStakeRewardHeight { get; }

public Money MinOpReturnFee { get; }

public x42Consensus(
ConsensusFactory consensusFactory,
ConsensusOptions consensusOptions,
Expand Down Expand Up @@ -188,6 +190,7 @@ public x42Consensus(
Money proofOfStakeRewardAfterSubsidyLimit,
long subsidyLimit,
Money lastProofOfStakeRewardHeight,
Money minOpReturnFee,
bool posEmptyCoinbase,
uint proofOfStakeTimestampMask
)
Expand Down Expand Up @@ -225,6 +228,7 @@ uint proofOfStakeTimestampMask
this.ProofOfStakeRewardAfterSubsidyLimit = proofOfStakeRewardAfterSubsidyLimit;
this.SubsidyLimit = subsidyLimit;
this.LastProofOfStakeRewardHeight = lastProofOfStakeRewardHeight;
this.MinOpReturnFee = minOpReturnFee;
this.ConsensusRules = new ConsensusRules();
this.MempoolRules = new List<Type>();
this.PosEmptyCoinbase = posEmptyCoinbase;
Expand Down
9 changes: 9 additions & 0 deletions src/Networks/x42/x42/Networks/Consensus/x42ConsensusErrors.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Blockcore.Consensus;

namespace x42.Networks.Consensus
{
public static class x42ConsensusErrors
{
public static ConsensusError InsufficientOpReturnFee => new ConsensusError("op-return-fee-insufficient", "The OP_RETURN fee is insufficient.");
}
}
330 changes: 0 additions & 330 deletions src/Networks/x42/x42/Networks/Consensus/x42PosBlockDefinition.cs

This file was deleted.

Loading

0 comments on commit 80a668f

Please sign in to comment.