Changeset View
Changeset View
Standalone View
Standalone View
src/miner.cpp
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | nLockTimeCutoff = | ||||
? nMedianTimePast | ? nMedianTimePast | ||||
: pblock->GetBlockTime(); | : pblock->GetBlockTime(); | ||||
addPriorityTxs(); | addPriorityTxs(); | ||||
int nPackagesSelected = 0; | int nPackagesSelected = 0; | ||||
int nDescendantsUpdated = 0; | int nDescendantsUpdated = 0; | ||||
addPackageTxs(nPackagesSelected, nDescendantsUpdated); | addPackageTxs(nPackagesSelected, nDescendantsUpdated); | ||||
if (IsMagneticAnomalyEnabled(*config, pindexPrev)) { | if (IsMagneticAnomalyEnabled(chainparams.GetConsensus(), pindexPrev)) { | ||||
// If magnetic anomaly is enabled, we make sure transaction are | // If magnetic anomaly is enabled, we make sure transaction are | ||||
// canonically ordered. | // canonically ordered. | ||||
// FIXME: Use a zipped list. See T479 | // FIXME: Use a zipped list. See T479 | ||||
std::sort(std::begin(pblocktemplate->entries) + 1, | std::sort(std::begin(pblocktemplate->entries) + 1, | ||||
std::end(pblocktemplate->entries), | std::end(pblocktemplate->entries), | ||||
[](const CBlockTemplateEntry &a, const CBlockTemplateEntry &b) | [](const CBlockTemplateEntry &a, const CBlockTemplateEntry &b) | ||||
-> bool { return a.tx->GetId() < b.tx->GetId(); }); | -> bool { return a.tx->GetId() < b.tx->GetId(); }); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 540 Lines • Show Last 20 Lines |