code logic is wrong if no mining block is generated in 24 hours #18231

issue MapleLaker opened this issue on February 29, 2020
  1. MapleLaker commented at 12:03 PM on February 29, 2020: contributor

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    i read code in IsInitialBlockDownload(), located in https://github.com/bitcoin/bitcoin/blob/master/src/validation.cpp.

    if (m_chain.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge)) return true;

    Let us image if someday somehow all miners are out of work for 1 day, all relay node's block will be 24 hours later than local time. Even they are always online. As a result all node becomes IBD status.

    This logic/code above should be considered ... Expected behavior

    <!--- What behavior did you expect? -->

    Actual behavior

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    To reproduce

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    System information

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. MapleLaker added the label Bug on Feb 29, 2020
  3. MarcoFalke commented at 2:52 PM on February 29, 2020: member

    No, it latches to false

  4. MarcoFalke closed this on Feb 29, 2020

  5. MapleLaker commented at 1:19 AM on March 1, 2020: contributor

    "latches to false" means "m_cached_finished_ibd"? it is in memory data. what if node is restarted and it is so lucky that all miner was not work during the node's offline time ?

  6. DrahtBot locked this on Feb 15, 2022
Labels

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-22 12:14 UTC

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