Send tip change notification from invalidateblock #9196

pull ryanofsky wants to merge 1 commits into bitcoin:master from ryanofsky:pr/notify-tip changing 1 files +1 −0
  1. ryanofsky commented at 4:02 PM on November 21, 2016: contributor

    @MarcoFalke suggested separating this commit from #9139. It's needed to prevent breaking a test that would otherwise fail with #9139.

  2. Send tip change notification from invalidateblock
    This change is needed to prevent sync_blocks timeouts in the mempool_reorg
    test after the sync_blocks update in the upcoming commit
    "[qa] Change sync_blocks to pick smarter maxheight".
    
    This change was initially suggested by Suhas Daftuar <sdaftuar@chaincode.com>
    in https://github.com/bitcoin/bitcoin/pull/8680#r78209060
    67c6326abd
  3. ryanofsky force-pushed on Nov 21, 2016
  4. ryanofsky cross-referenced this on Nov 21, 2016 from issue Change sync_blocks to pick smarter maxheight (on top of #9196) by ryanofsky
  5. morcos commented at 4:54 PM on November 21, 2016: member

    ACK

  6. MarcoFalke commented at 11:28 PM on November 21, 2016: member

    Concept ACK.

    Can confirm, that this fixes the "Current number of blocks" display in the debug window, when invalidateblock is used.

    Also, can confirm that this fixes the test failure in mempool_reorg after #9139.

  7. MarcoFalke added the label Needs backport on Nov 21, 2016
  8. MarcoFalke added this to the milestone 0.13.2 on Nov 21, 2016
  9. MarcoFalke commented at 11:48 PM on November 21, 2016: member

    Tagged for backport to .13

    (Backport to .12 also required)

  10. MarcoFalke added this to the milestone 0.12.2 on Nov 21, 2016
  11. MarcoFalke removed this from the milestone 0.13.2 on Nov 21, 2016
  12. MarcoFalke added this to the milestone 0.13.2 on Nov 21, 2016
  13. MarcoFalke removed this from the milestone 0.12.2 on Nov 21, 2016
  14. sipa commented at 10:23 PM on November 22, 2016: member

    utACK

  15. sdaftuar commented at 1:19 AM on November 23, 2016: member

    utACK

  16. jonasschnelli commented at 7:28 AM on November 23, 2016: contributor

    utACK 67c6326abd1788e6f411feb4f44b69774e76aae2

  17. laanwj merged this on Nov 23, 2016
  18. laanwj closed this on Nov 23, 2016

  19. laanwj referenced this in commit 7e2bfd6241 on Nov 23, 2016
  20. in src/main.cpp:None in 67c6326abd
    3200 | @@ -3201,6 +3201,7 @@ bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, C
    3201 |  
    3202 |      InvalidChainFound(pindex);
    3203 |      mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS);
    3204 | +    uiInterface.NotifyBlockTip(IsInitialBlockDownload(), pindex->pprev);
    


    luke-jr commented at 7:42 AM on November 23, 2016:

    What if the new best isn't pindex->pprev?


    jonasschnelli commented at 9:07 AM on November 23, 2016:

    At this point, pindex->pprev == chainActive.Tip(). If there are valid blocks on top of the new tip with more ChainWork, it will be detected during the ActivateBestChain(state, Params(), NULL); in UniValue invalidateblock(const JSONRPCRequest& request). The signal then gets fired twice (seems to be okay).

  21. MarcoFalke referenced this in commit 0de7fd36de on Nov 23, 2016
  22. MarcoFalke referenced this in commit d0d506518f on Nov 23, 2016
  23. MarcoFalke referenced this in commit cca151b3a4 on Nov 23, 2016
  24. MarcoFalke removed the label Needs backport on Nov 23, 2016
  25. MarcoFalke added this to the milestone 0.12.2 on Nov 23, 2016
  26. MarcoFalke removed this from the milestone 0.13.2 on Nov 23, 2016
  27. luke-jr referenced this in commit 0c09d9f00e on Dec 2, 2016
  28. laanwj added the label Validation on Dec 19, 2016
  29. UdjinM6 referenced this in commit 8e9a4165f5 on Mar 22, 2017
  30. UdjinM6 referenced this in commit b659d71645 on Mar 22, 2017
  31. UdjinM6 referenced this in commit ff30aed68f on Apr 11, 2017
  32. codablock referenced this in commit 646ebd344a on Jan 16, 2018
  33. codablock referenced this in commit 09245eda70 on Jan 16, 2018
  34. codablock referenced this in commit f831710f46 on Jan 17, 2018
  35. thokon00 referenced this in commit 6e72bb1bb6 on Apr 17, 2018
  36. andvgal referenced this in commit 6b27fec32e on Jan 6, 2019
  37. CryptoCentric referenced this in commit 8baadb154b on Feb 25, 2019
  38. bitcoin locked this on Sep 8, 2021

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-05-19 06:55 UTC