Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benjamin Allred
crown-core
Commits
47059027
Commit
47059027
authored
10 years ago
by
Wladimir J. van der Laan
Browse files
Options
Download
Email Patches
Plain Diff
Avoid introducing a virtual into CChainParams
Treat fSkipProofOfWorkCheck the same as other parameters.
parent
5e2e7fcb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/chainparams.cpp
+1
-4
src/chainparams.cpp
src/chainparams.h
+2
-1
src/chainparams.h
with
3 additions
and
5 deletions
+3
-5
src/chainparams.cpp
View file @
47059027
...
...
@@ -115,6 +115,7 @@ public:
fAllowMinDifficultyBlocks
=
false
;
fRequireStandard
=
true
;
fMineBlocksOnDemand
=
false
;
fSkipProofOfWorkCheck
=
false
;
}
};
static
CMainParams
mainParams
;
...
...
@@ -231,11 +232,7 @@ public:
fDefaultCheckMemPool
=
true
;
fAllowMinDifficultyBlocks
=
false
;
fMineBlocksOnDemand
=
true
;
fSkipProofOfWorkCheck
=
false
;
}
virtual
bool
SkipProofOfWorkCheck
()
const
{
return
fSkipProofOfWorkCheck
;
}
protected:
bool
fSkipProofOfWorkCheck
;
public:
// Published setters to allow changing values in unit test cases
virtual
void
setSubsidyHalvingInterval
(
int
anSubsidyHalvingInterval
)
{
nSubsidyHalvingInterval
=
anSubsidyHalvingInterval
;
}
...
...
This diff is collapsed.
Click to expand it.
src/chainparams.h
View file @
47059027
...
...
@@ -62,7 +62,7 @@ public:
/* Allow mining of a min-difficulty block */
bool
AllowMinDifficultyBlocks
()
const
{
return
fAllowMinDifficultyBlocks
;
}
/* Skip proof-of-work check: allow mining of any difficulty block */
virtual
bool
SkipProofOfWorkCheck
()
const
{
return
f
alse
;
}
bool
SkipProofOfWorkCheck
()
const
{
return
f
SkipProofOfWorkCheck
;
}
/* Make standard checks */
bool
RequireStandard
()
const
{
return
fRequireStandard
;
}
int64_t
TargetTimespan
()
const
{
return
nTargetTimespan
;
}
...
...
@@ -105,6 +105,7 @@ protected:
bool
fAllowMinDifficultyBlocks
;
bool
fRequireStandard
;
bool
fMineBlocksOnDemand
;
bool
fSkipProofOfWorkCheck
;
};
/** Modifiable parameters interface is used by test cases to adapt the parameters in order
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help