Create new signal for notification of new blocks. Use w/ -blocknotify #4599

pull jgarzik wants to merge 2 commits into bitcoin:master from jgarzik:blocknotify-signal changing 4 files +19 −20
  1. jgarzik commented at 6:52 pm on July 28, 2014: contributor
    Drops lock before calling signal. Not purely necessary, but good practice.
  2. sipa commented at 8:35 pm on July 28, 2014: member
    Untested ACK.
  3. laanwj commented at 7:21 am on July 29, 2014: member
    Please remove NotifyBlocksChanged as well. There’s no point in having both and it’s unused.
  4. jgarzik commented at 2:54 pm on July 29, 2014: contributor
    @laanwj updated
  5. laanwj commented at 6:39 am on July 30, 2014: member

    Thanks!

    ut ACK.

  6. jgarzik added this to the milestone 0.10.0 on Jul 31, 2014
  7. jgarzik added the label Improvement on Jul 31, 2014
  8. jgarzik commented at 4:12 am on July 31, 2014: contributor
    Updated to avoid connecting signal, if -blocknotify absent. Re-tested absent and present cases.
  9. sipa commented at 4:39 am on July 31, 2014: member

    Nice change to connect the signal conditionally. Two nits:

    • No need to check for the -blocknotify argument being empty.
    • The function being bound can have a much clearer name (“BlockNotifyCallback” ?).
  10. ui_interface: remove unused NotifyBlocksChanged signal beb36e800c
  11. Create new signal for notification of new blocks. Use w/ -blocknotify ca1b40d6dd
  12. in src/main.cpp: in 9dd8483ee5 outdated
    2124@@ -2127,6 +2125,14 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
    2125     return true;
    2126 }
    2127 
    2128+void BlockNotifyCallback(const uint256& hashNewTip)
    


    laanwj commented at 6:48 am on July 31, 2014:
    I’d like this callback moved out of main.cpp, as it’s a) just a wrapper arond runCommand b) not referred to in main.cpp but only in init.cpp.

    jgarzik commented at 4:18 pm on August 14, 2014:
    Moving it out of main.cpp is fine. However, init.cpp should not be home to code continuously executed during program runtime, well after initialization completes.
  13. jgarzik force-pushed on Aug 25, 2014
  14. BitcoinPullTester commented at 7:09 pm on August 25, 2014: none
    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4599_ca1b40d6ddcfa5d42539fc98b580a3d815a8ef57/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
  15. jgarzik commented at 7:26 pm on August 25, 2014: contributor
    Fixed build bug (#include error).
  16. jgarzik referenced this in commit 309aa76d27 on Aug 29, 2014
  17. jgarzik closed this on Aug 29, 2014

  18. jgarzik deleted the branch on Aug 29, 2014
  19. MarcoFalke 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: 2024-12-19 12:12 UTC

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