Commit 6901bc0a authored by Sergei Zubov's avatar Sergei Zubov

Modify test network settings

parent 6f126a35
...@@ -3,9 +3,13 @@ ...@@ -3,9 +3,13 @@
"DeStream.DeStream": { "DeStream.DeStream": {
"commandName": "Project" "commandName": "Project"
}, },
"DeStream.DeStream Trace": {
"commandName": "Project",
"commandLineArgs": "-debug -loglevel=trace -gateway"
},
"DeStream.DeStreamD Test": { "DeStream.DeStreamD Test": {
"commandName": "Project", "commandName": "Project",
"commandLineArgs": "-testnet -debug -loglevel=trace" "commandLineArgs": "-testnet -addnode=40.121.9.206"
}, },
"Stratis.StratisD": { "Stratis.StratisD": {
"commandName": "Project" "commandName": "Project"
......
...@@ -76,25 +76,11 @@ namespace NBitcoin.Networks ...@@ -76,25 +76,11 @@ namespace NBitcoin.Networks
this.Consensus.PowLimit = this.Consensus.PowLimit =
new Target(new uint256("0000ffff00000000000000000000000000000000000000000000000000000000")); new Target(new uint256("0000ffff00000000000000000000000000000000000000000000000000000000"));
this.Consensus.PowTargetTimespan = TimeSpan.FromSeconds(14 * 24 * 60 * 60); // two weeks this.Consensus.DefaultAssumeValid = new uint256("0x98fa6ef0bca5b431f15fd79dc6f879dc45b83ed4b1bbe933a383ef438321958e"); // 372652
this.Consensus.PowTargetSpacing = TimeSpan.FromSeconds(10 * 60);
this.Consensus.PowAllowMinDifficultyBlocks = false;
this.Consensus.PowNoRetargeting = false;
this.Consensus.RuleChangeActivationThreshold = 1916; // 95% of 2016
this.Consensus.MinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
this.Consensus.LastPOWBlock = 12500;
this.Consensus.DefaultAssumeValid =
new uint256("0x98fa6ef0bca5b431f15fd79dc6f879dc45b83ed4b1bbe933a383ef438321958e"); // 372652
this.Consensus.CoinbaseMaturity = 10; this.Consensus.CoinbaseMaturity = 10;
this.Consensus.MaxMoney = long.MaxValue; this.Consensus.MaxReorgLength = 20;
this.Consensus.ProofOfWorkReward = Money.Zero;
this.Consensus.ProofOfStakeReward = Money.Zero;
this.Consensus.LastPOWBlock = 12500;
this.Consensus.CoinType = 1; this.Consensus.CoinType = 1;
this.DeStreamFeePart = 0.9;
this.FeeRate = 0.0077;
this.Base58Prefixes[(int) Base58Type.PUBKEY_ADDRESS] = new byte[] {66}; this.Base58Prefixes[(int) Base58Type.PUBKEY_ADDRESS] = new byte[] {66};
this.Base58Prefixes[(int) Base58Type.SCRIPT_ADDRESS] = new byte[] {128}; this.Base58Prefixes[(int) Base58Type.SCRIPT_ADDRESS] = new byte[] {128};
this.Base58Prefixes[(int) Base58Type.SECRET_KEY] = new byte[] {66 + 128}; this.Base58Prefixes[(int) Base58Type.SECRET_KEY] = new byte[] {66 + 128};
...@@ -112,7 +98,7 @@ namespace NBitcoin.Networks ...@@ -112,7 +98,7 @@ namespace NBitcoin.Networks
this.SeedNodes = new List<NetworkAddress>(); this.SeedNodes = new List<NetworkAddress>();
// Create the genesis block. // Create the genesis block.
this.GenesisTime = 1470467000; this.GenesisTime = (uint) new DateTimeOffset(2019, 2, 11, 0, 0, 0, new TimeSpan()).ToUnixTimeSeconds();
this.GenesisNonce = 1831645; this.GenesisNonce = 1831645;
this.GenesisBits = 0x1e0fffff; this.GenesisBits = 0x1e0fffff;
this.GenesisVersion = 1; this.GenesisVersion = 1;
...@@ -122,8 +108,7 @@ namespace NBitcoin.Networks ...@@ -122,8 +108,7 @@ namespace NBitcoin.Networks
this.Genesis = this.CreateDeStreamGenesisBlock(this.Consensus.ConsensusFactory, this.GenesisTime, this.Genesis = this.CreateDeStreamGenesisBlock(this.Consensus.ConsensusFactory, this.GenesisTime,
this.GenesisNonce, this.GenesisBits, this.GenesisVersion, this.GenesisReward, this.GenesisNonce, this.GenesisBits, this.GenesisVersion, this.GenesisReward,
initialWalletAddresses); initialWalletAddresses);
this.Genesis.Header.Time = this.Genesis.Header.Time = (uint) new DateTimeOffset(2019, 2, 11, 12, 0, 0, new TimeSpan()).ToUnixTimeSeconds();
(uint) new DateTimeOffset(2018, 09, 24, 16, 13, 00, TimeSpan.FromHours(3)).ToUnixTimeSeconds();
this.Genesis.Header.Nonce = 2433759; this.Genesis.Header.Nonce = 2433759;
this.Genesis.Header.Bits = this.Consensus.PowLimit; this.Genesis.Header.Bits = this.Consensus.PowLimit;
this.Consensus.HashGenesisBlock = this.Genesis.GetHash(); this.Consensus.HashGenesisBlock = this.Genesis.GetHash();
......
...@@ -7,10 +7,7 @@ namespace Stratis.Bitcoin.Features.Consensus ...@@ -7,10 +7,7 @@ namespace Stratis.Bitcoin.Features.Consensus
{ {
public override int GetStakeMinConfirmations(int height, Network network) public override int GetStakeMinConfirmations(int height, Network network)
{ {
if(network.IsTest()) return network.IsTest() ? 20 : 500;
return height < CoinstakeMinConfirmationActivationHeightTestnet ? 10 : 20;
return 500;
} }
} }
} }
\ No newline at end of file
...@@ -33,6 +33,7 @@ namespace Stratis.Bitcoin.Features.Miner ...@@ -33,6 +33,7 @@ namespace Stratis.Bitcoin.Features.Miner
coinView, stakeChain, stakeValidator, mempoolLock, mempool, walletManager, asyncLoopFactory, coinView, stakeChain, stakeValidator, mempoolLock, mempool, walletManager, asyncLoopFactory,
timeSyncBehaviorState, loggerFactory) timeSyncBehaviorState, loggerFactory)
{ {
this.targetReserveBalance = this.network.IsTest() ? 0 : 50000000 * Money.COIN;
} }
protected override void CoinstakeWorker(CoinstakeWorkerContext context, ChainedHeader chainTip, Block block, protected override void CoinstakeWorker(CoinstakeWorkerContext context, ChainedHeader chainTip, Block block,
......
...@@ -370,7 +370,7 @@ namespace Stratis.Bitcoin.Features.Miner ...@@ -370,7 +370,7 @@ namespace Stratis.Bitcoin.Features.Miner
this.systemTimeOutOfSyncSleep = 7000; this.systemTimeOutOfSyncSleep = 7000;
this.lastCoinStakeSearchTime = this.dateTimeProvider.GetAdjustedTimeAsUnixTimestamp(); this.lastCoinStakeSearchTime = this.dateTimeProvider.GetAdjustedTimeAsUnixTimestamp();
this.lastCoinStakeSearchPrevBlockHash = 0; this.lastCoinStakeSearchPrevBlockHash = 0;
this.targetReserveBalance = 50000000 * Money.COIN; // TOOD:settings.targetReserveBalance this.targetReserveBalance = 0; // TOOD:settings.targetReserveBalance
this.stakeProgressFlag = StakeNotInProgress; this.stakeProgressFlag = StakeNotInProgress;
this.rpcGetStakingInfoModel = new Miner.Models.GetStakingInfoModel(); this.rpcGetStakingInfoModel = new Miner.Models.GetStakingInfoModel();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment