Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 5,590 Lines • ▼ Show 20 Lines | try { | ||||
int64_t nTime; | int64_t nTime; | ||||
int64_t nFeeDelta; | int64_t nFeeDelta; | ||||
file >> tx; | file >> tx; | ||||
file >> nTime; | file >> nTime; | ||||
file >> nFeeDelta; | file >> nFeeDelta; | ||||
Amount amountdelta = nFeeDelta * SATOSHI; | Amount amountdelta = nFeeDelta * SATOSHI; | ||||
if (amountdelta != Amount::zero()) { | if (amountdelta != Amount::zero()) { | ||||
g_mempool.PrioritiseTransaction(tx->GetId(), | g_mempool.PrioritiseTransaction(tx->GetId(), prioritydummy, | ||||
tx->GetId().ToString(), | amountdelta); | ||||
prioritydummy, amountdelta); | |||||
} | } | ||||
CValidationState state; | CValidationState state; | ||||
if (nTime + nExpiryTimeout > nNow) { | if (nTime + nExpiryTimeout > nNow) { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
AcceptToMemoryPoolWithTime(config, g_mempool, state, tx, true, | AcceptToMemoryPoolWithTime(config, g_mempool, state, tx, true, | ||||
nullptr, nTime); | nullptr, nTime); | ||||
if (state.IsValid()) { | if (state.IsValid()) { | ||||
++count; | ++count; | ||||
} else { | } else { | ||||
++failed; | ++failed; | ||||
} | } | ||||
} else { | } else { | ||||
++skipped; | ++skipped; | ||||
} | } | ||||
if (ShutdownRequested()) { | if (ShutdownRequested()) { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
std::map<uint256, Amount> mapDeltas; | std::map<uint256, Amount> mapDeltas; | ||||
file >> mapDeltas; | file >> mapDeltas; | ||||
for (const auto &i : mapDeltas) { | for (const auto &i : mapDeltas) { | ||||
g_mempool.PrioritiseTransaction(i.first, i.first.ToString(), | g_mempool.PrioritiseTransaction(i.first, prioritydummy, i.second); | ||||
prioritydummy, i.second); | |||||
} | } | ||||
} catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
LogPrintf("Failed to deserialize mempool data on disk: %s. Continuing " | LogPrintf("Failed to deserialize mempool data on disk: %s. Continuing " | ||||
"anyway.\n", | "anyway.\n", | ||||
e.what()); | e.what()); | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |