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

Modify test network settings

parent 6f126a35
......@@ -3,9 +3,13 @@
"DeStream.DeStream": {
"commandName": "Project"
},
"DeStream.DeStream Trace": {
"commandName": "Project",
"commandLineArgs": "-debug -loglevel=trace -gateway"
},
"DeStream.DeStreamD Test": {
"commandName": "Project",
"commandLineArgs": "-testnet -debug -loglevel=trace"
"commandLineArgs": "-testnet -addnode=40.121.9.206"
},
"Stratis.StratisD": {
"commandName": "Project"
......
......@@ -76,25 +76,11 @@ namespace NBitcoin.Networks
this.Consensus.PowLimit =
new Target(new uint256("0000ffff00000000000000000000000000000000000000000000000000000000"));
this.Consensus.PowTargetTimespan = TimeSpan.FromSeconds(14 * 24 * 60 * 60); // two weeks
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.DefaultAssumeValid = new uint256("0x98fa6ef0bca5b431f15fd79dc6f879dc45b83ed4b1bbe933a383ef438321958e"); // 372652
this.Consensus.CoinbaseMaturity = 10;
this.Consensus.MaxMoney = long.MaxValue;
this.Consensus.ProofOfWorkReward = Money.Zero;
this.Consensus.ProofOfStakeReward = Money.Zero;
this.Consensus.LastPOWBlock = 12500;
this.Consensus.MaxReorgLength = 20;
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.SCRIPT_ADDRESS] = new byte[] {128};
this.Base58Prefixes[(int) Base58Type.SECRET_KEY] = new byte[] {66 + 128};
......@@ -112,7 +98,7 @@ namespace NBitcoin.Networks
this.SeedNodes = new List<NetworkAddress>();
// 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.GenesisBits = 0x1e0fffff;
this.GenesisVersion = 1;
......@@ -122,8 +108,7 @@ namespace NBitcoin.Networks
this.Genesis = this.CreateDeStreamGenesisBlock(this.Consensus.ConsensusFactory, this.GenesisTime,
this.GenesisNonce, this.GenesisBits, this.GenesisVersion, this.GenesisReward,
initialWalletAddresses);
this.Genesis.Header.Time =
(uint) new DateTimeOffset(2018, 09, 24, 16, 13, 00, TimeSpan.FromHours(3)).ToUnixTimeSeconds();
this.Genesis.Header.Time = (uint) new DateTimeOffset(2019, 2, 11, 12, 0, 0, new TimeSpan()).ToUnixTimeSeconds();
this.Genesis.Header.Nonce = 2433759;
this.Genesis.Header.Bits = this.Consensus.PowLimit;
this.Consensus.HashGenesisBlock = this.Genesis.GetHash();
......
......@@ -7,10 +7,7 @@ namespace Stratis.Bitcoin.Features.Consensus
{
public override int GetStakeMinConfirmations(int height, Network network)
{
if(network.IsTest())
return height < CoinstakeMinConfirmationActivationHeightTestnet ? 10 : 20;
return 500;
return network.IsTest() ? 20 : 500;
}
}
}
\ No newline at end of file
......@@ -33,6 +33,7 @@ namespace Stratis.Bitcoin.Features.Miner
coinView, stakeChain, stakeValidator, mempoolLock, mempool, walletManager, asyncLoopFactory,
timeSyncBehaviorState, loggerFactory)
{
this.targetReserveBalance = this.network.IsTest() ? 0 : 50000000 * Money.COIN;
}
protected override void CoinstakeWorker(CoinstakeWorkerContext context, ChainedHeader chainTip, Block block,
......
......@@ -370,7 +370,7 @@ namespace Stratis.Bitcoin.Features.Miner
this.systemTimeOutOfSyncSleep = 7000;
this.lastCoinStakeSearchTime = this.dateTimeProvider.GetAdjustedTimeAsUnixTimestamp();
this.lastCoinStakeSearchPrevBlockHash = 0;
this.targetReserveBalance = 50000000 * Money.COIN; // TOOD:settings.targetReserveBalance
this.targetReserveBalance = 0; // TOOD:settings.targetReserveBalance
this.stakeProgressFlag = StakeNotInProgress;
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