Skip to content

Commit 80a668f

Browse files
Added fee for OP_RETURN for x42. (#139)
1 parent b83d16f commit 80a668f

7 files changed

Lines changed: 70 additions & 331 deletions

File tree

src/Networks/x42/x42/Networks/Consensus/x42Consensus.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ public class x42Consensus : IConsensus
154154
/// <inheritdoc />
155155
public Money LastProofOfStakeRewardHeight { get; }
156156

157+
public Money MinOpReturnFee { get; }
158+
157159
public x42Consensus(
158160
ConsensusFactory consensusFactory,
159161
ConsensusOptions consensusOptions,
@@ -188,6 +190,7 @@ public x42Consensus(
188190
Money proofOfStakeRewardAfterSubsidyLimit,
189191
long subsidyLimit,
190192
Money lastProofOfStakeRewardHeight,
193+
Money minOpReturnFee,
191194
bool posEmptyCoinbase,
192195
uint proofOfStakeTimestampMask
193196
)
@@ -225,6 +228,7 @@ uint proofOfStakeTimestampMask
225228
this.ProofOfStakeRewardAfterSubsidyLimit = proofOfStakeRewardAfterSubsidyLimit;
226229
this.SubsidyLimit = subsidyLimit;
227230
this.LastProofOfStakeRewardHeight = lastProofOfStakeRewardHeight;
231+
this.MinOpReturnFee = minOpReturnFee;
228232
this.ConsensusRules = new ConsensusRules();
229233
this.MempoolRules = new List<Type>();
230234
this.PosEmptyCoinbase = posEmptyCoinbase;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using Blockcore.Consensus;
2+
3+
namespace x42.Networks.Consensus
4+
{
5+
public static class x42ConsensusErrors
6+
{
7+
public static ConsensusError InsufficientOpReturnFee => new ConsensusError("op-return-fee-insufficient", "The OP_RETURN fee is insufficient.");
8+
}
9+
}

src/Networks/x42/x42/Networks/Consensus/x42PosBlockDefinition.cs

Lines changed: 0 additions & 330 deletions
This file was deleted.

0 commit comments

Comments
 (0)