mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Support fee estimation for fees lower than 1 sat/byte
This commit is contained in:
parent
3c029f42bd
commit
6939a7248f
2 changed files with 8 additions and 3 deletions
|
|
@ -901,7 +901,9 @@ bool CBlockPolicyEstimator::Write(CAutoFile& fileout) const
|
|||
{
|
||||
try {
|
||||
LOCK(m_cs_fee_estimator);
|
||||
fileout << 149900; // version required to read: 0.14.99 or later
|
||||
//ELEMENTS: We upped this from 0.14.99 in upstream because
|
||||
// we changed the bucket sizes.
|
||||
fileout << 180107; // version required to read: 0.18.1.7
|
||||
fileout << CLIENT_VERSION; // version that wrote the file
|
||||
fileout << nBestSeenHeight;
|
||||
if (BlockSpan() > HistoricalBlockSpan()/2) {
|
||||
|
|
@ -938,6 +940,9 @@ bool CBlockPolicyEstimator::Read(CAutoFile& filein)
|
|||
|
||||
if (nVersionRequired < 149900) {
|
||||
LogPrintf("%s: incompatible old fee estimation data (non-fatal). Version: %d\n", __func__, nVersionRequired);
|
||||
} else if (nVersionThatWrote < 180107) {
|
||||
//ELEMENTS: we changed the buckets in 0.18.1.7
|
||||
LogPrintf("%s: incompatible old fee estimation data (non-fatal). Version: %d\n", __func__, nVersionThatWrote);
|
||||
} else { // New format introduced in 149900
|
||||
unsigned int nFileHistoricalFirst, nFileHistoricalBest;
|
||||
filein >> nFileHistoricalFirst >> nFileHistoricalBest;
|
||||
|
|
|
|||
|
|
@ -174,8 +174,8 @@ private:
|
|||
* invalidates old estimates files. So leave it at 1000 unless it becomes
|
||||
* necessary to lower it, and then lower it substantially.
|
||||
*/
|
||||
static constexpr double MIN_BUCKET_FEERATE = 1000;
|
||||
static constexpr double MAX_BUCKET_FEERATE = 1e7;
|
||||
static constexpr double MIN_BUCKET_FEERATE = 100;
|
||||
static constexpr double MAX_BUCKET_FEERATE = 1e6;
|
||||
|
||||
/** Spacing of FeeRate buckets
|
||||
* We have to lump transactions into buckets based on feerate, but we want to be able
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue