mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge 0f35f4ddf4 into merged_master (Bitcoin PR bitcoin/bitcoin#25786)
This commit is contained in:
commit
3fd262a515
11 changed files with 36 additions and 16 deletions
|
|
@ -42,7 +42,7 @@ void ResetProof(CBlockHeader& block)
|
|||
int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev)
|
||||
{
|
||||
int64_t nOldTime = pblock->nTime;
|
||||
int64_t nNewTime = std::max(pindexPrev->GetMedianTimePast() + 1, GetAdjustedTime());
|
||||
int64_t nNewTime{std::max<int64_t>(pindexPrev->GetMedianTimePast() + 1, TicksSinceEpoch<std::chrono::seconds>(GetAdjustedTime()))};
|
||||
|
||||
if (nOldTime < nNewTime) {
|
||||
pblock->nTime = nNewTime;
|
||||
|
|
@ -148,7 +148,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
|
|||
pblock->nVersion = gArgs.GetIntArg("-blockversion", pblock->nVersion);
|
||||
}
|
||||
|
||||
pblock->nTime = GetAdjustedTime();
|
||||
pblock->nTime = TicksSinceEpoch<std::chrono::seconds>(GetAdjustedTime());
|
||||
m_lock_time_cutoff = pindexPrev->GetMedianTimePast();
|
||||
|
||||
// ELEMENTS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue