log: Remove GetAdjustedTime from IBD header progress estimation #24033

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2201-logNoNonsense changing 1 files +4 −1
  1. MarcoFalke commented at 12:22 PM on January 11, 2022: member

    This is a "refactor" that shouldn't change behaviour, because the two times are most likely equal. A minimum of 5 outbound peers are needed to adjust the time. And if the time is adjusted, it will be by at most 70 minutes (DEFAULT_MAX_TIME_ADJUSTMENT). Thus, the progress estimate should differ by at most 7 blocks.

  2. log: Remove GetAdjustedTime from IBD header progress estimation fac22fd36b
  3. MarcoFalke added the label Refactoring on Jan 11, 2022
  4. MarcoFalke added the label Utils/log/libs on Jan 11, 2022
  5. MarcoFalke commented at 12:39 PM on January 11, 2022: member

    The GUI doesn't use adjusted time either:

    void ModalOverlay::UpdateHeaderSyncLabel() {
        int est_headers_left = bestHeaderDate.secsTo(QDateTime::currentDateTime()) / Params().GetConsensus().nPowTargetSpacing;
        ui->numberOfBlocksLeft->setText(tr("Unknown. Syncing Headers (%1, %2%)…").arg(bestHeaderHeight).arg(QString::number(100.0 / (bestHeaderHeight + est_headers_left) * bestHeaderHeight, 'f', 1)));
    }
    
  6. laanwj commented at 3:24 PM on January 13, 2022: member

    Code review ACK fac22fd36b2d9f55dada31cc0da55520431b972a

  7. vincenzopalazzo approved
  8. MarcoFalke merged this on Jan 17, 2022
  9. MarcoFalke closed this on Jan 17, 2022

  10. MarcoFalke deleted the branch on Jan 17, 2022
  11. sidhujag referenced this in commit 8a053991b0 on Jan 18, 2022
  12. Fabcien referenced this in commit 1b1de7353a on Dec 19, 2022
  13. DrahtBot locked this on Jan 17, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me