Skip to content

Commit

Permalink
Add BIP deploment and increase fallbackfee
Browse files Browse the repository at this point in the history
- Increase the fallbackfee a little bit to fix an issue with sweep.
- Add the sample BIP deployment.
  • Loading branch information
sondreb committed Feb 26, 2021
1 parent 88fc347 commit 5b88fa7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Blockcore.SampleCoin.Template.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Blockcore.Coin.Template</id>
<version>0.0.6</version>
<version>0.0.7</version>
<description>
Creates a new blockchain based on Blockcore technology.
</description>
Expand Down
13 changes: 11 additions & 2 deletions Blockcore.SampleCoin/src/SampleCoin/Networks/SampleCoinMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Blockcore.P2P;
using Blockcore.Consensus.TransactionInfo;
using Blockcore.Consensus.ScriptInfo;
using Blockcore.SampleCoin.Networks.Deployments;

namespace Blockcore.SampleCoin.Networks
{
Expand All @@ -47,7 +48,7 @@ public SampleCoinMain()
MaxTipAge = 2 * 60 * 60;
MinTxFee = 10000;
MaxTxFee = Money.Coins(1).Satoshi;
FallbackFee = 10000;
FallbackFee = 12500;
MinRelayTxFee = 10000;
MaxTimeOffsetSeconds = 25 * 60;
DefaultBanTimeSeconds = 16000; // 500 (MaxReorg) * 64 (TargetSpacing) / 2 = 4 hours, 26 minutes and 40 seconds
Expand Down Expand Up @@ -88,6 +89,14 @@ public SampleCoinMain()
[BuriedDeployments.BIP66] = 0
};

var bip9Deployments = new SampleCoinBIP9Deployments()
{
[SampleCoinBIP9Deployments.ColdStaking] = new BIP9DeploymentsParameters("ColdStaking", 2,
new DateTime(2018, 12, 1, 0, 0, 0, DateTimeKind.Utc),
new DateTime(2019, 12, 1, 0, 0, 0, DateTimeKind.Utc),
BIP9DeploymentsParameters.DefaultMainnetThreshold)
};

Consensus = new Blockcore.Consensus.Consensus(
consensusFactory: consensusFactory,
consensusOptions: consensusOptions,
Expand All @@ -98,7 +107,7 @@ public SampleCoinMain()
majorityRejectBlockOutdated: 950,
majorityWindow: 1000,
buriedDeployments: buriedDeployments,
bip9Deployments: new NoBIP9Deployments(),
bip9Deployments: bip9Deployments,
bip34Hash: null,
minerConfirmationWindow: 2016, // nPowTargetTimespan / nPowTargetSpacing
maxReorgLength: 500,
Expand Down

0 comments on commit 5b88fa7

Please sign in to comment.