Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
destream-blockchain
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
destream-blockchain
Commits
6901bc0a
Commit
6901bc0a
authored
Feb 11, 2019
by
Sergei Zubov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify test network settings
parent
6f126a35
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
25 deletions
+12
-25
launchSettings.json
Sources/DeStream.DeStreamD/Properties/launchSettings.json
+5
-1
DeStreamTest.cs
Sources/NBitcoin/Networks/DeStreamTest.cs
+4
-19
DeStreamPosConsensusOptions.cs
...Bitcoin.Features.Consensus/DeStreamPosConsensusOptions.cs
+1
-4
DeStreamPosMinting.cs
Sources/Stratis.Bitcoin.Features.Miner/DeStreamPosMinting.cs
+1
-0
PosMinting.cs
Sources/Stratis.Bitcoin.Features.Miner/PosMinting.cs
+1
-1
No files found.
Sources/DeStream.DeStreamD/Properties/launchSettings.json
View file @
6901bc0a
...
@@ -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"
...
...
Sources/NBitcoin/Networks/DeStreamTest.cs
View file @
6901bc0a
...
@@ -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
();
...
...
Sources/Stratis.Bitcoin.Features.Consensus/DeStreamPosConsensusOptions.cs
View file @
6901bc0a
...
@@ -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
Sources/Stratis.Bitcoin.Features.Miner/DeStreamPosMinting.cs
View file @
6901bc0a
...
@@ -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
,
...
...
Sources/Stratis.Bitcoin.Features.Miner/PosMinting.cs
View file @
6901bc0a
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment