Skip to content

Commit 18dc8bb

Browse files
committed
Add activation code for the new DAA.
Summary: This adds the activation of the new DAA in ABC. Test Plan: Tested activation large scale with bitprim. Reviewers: freetrader, schancel, #bitcoin_abc Reviewed By: schancel, #bitcoin_abc Differential Revision: https://reviews.bitcoinabc.org/D628
1 parent be51cf2 commit 18dc8bb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/pow.cpp‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "chain.h"
1111
#include "primitives/block.h"
1212
#include "uint256.h"
13+
#include "util.h"
1314

1415
/**
1516
* Compute the next required proof of work using the legacy Bitcoin difficulty
@@ -97,6 +98,11 @@ uint32_t GetNextWorkRequired(const CBlockIndex *pindexPrev,
9798
return pindexPrev->nBits;
9899
}
99100

101+
if (pindexPrev->GetMedianTimePast() >=
102+
GetArg("-newdaaactivationtime", params.cashHardForkActivationTime)) {
103+
return GetNextCashWorkRequired(pindexPrev, pblock, params);
104+
}
105+
100106
return GetNextEDAWorkRequired(pindexPrev, pblock, params);
101107
}
102108

0 commit comments

Comments
 (0)