aboutsummaryrefslogtreecommitdiff
path: root/src/consensus/params.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/consensus/params.h')
-rw-r--r--src/consensus/params.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/consensus/params.h b/src/consensus/params.h
index 794e0f5383..7c35222713 100644
--- a/src/consensus/params.h
+++ b/src/consensus/params.h
@@ -8,6 +8,7 @@
#include <uint256.h>
+#include <chrono>
#include <limits>
#include <map>
@@ -109,6 +110,10 @@ struct Params {
bool fPowNoRetargeting;
int64_t nPowTargetSpacing;
int64_t nPowTargetTimespan;
+ std::chrono::seconds PowTargetSpacing() const
+ {
+ return std::chrono::seconds{nPowTargetSpacing};
+ }
int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; }
/** The best chain should have at least this much work */
uint256 nMinimumChainWork;