New RPC calls: monitortx monitorblocks listmonitored getblock #198

pull gavinandresen wants to merge 1 commits into bitcoin:master from gavinandresen:monitorreceived changing 13 files +453 −74
  1. gavinandresen commented at 3:29 PM on May 6, 2011: contributor

    monitortx/monitorblocks: POST JSON-RPC to a URL when new wallet transactions or blocks are received. listmonitored: list URLS that will be POSTed to getblock: get information about a block, given depth in main chain.

  2. gavinandresen commented at 3:46 PM on May 6, 2011: contributor
  3. gavinandresen commented at 12:35 AM on June 23, 2011: contributor

    Made it work with the re-organized CWallet codebase... ... but I'm not 100% happy with it. I'm not sure it properly handles block chain re-orgs and dependent orphan transactions. Would be nice to write some tests to exercise those edge cases, and figure out what it SHOULD do in those cases.

  4. sipa commented at 9:42 AM on June 23, 2011: member

    I believe it will only do the callback for newly arriving blocks when doing a reorganisation, and not for replacements of older blocks (didn't test it though). If that's not what you want, the call to monitorBlock() should go in CBlock::ConnectBlock() (called for each block that's being added to the main chain).

    Dependent transactions are only used for self-created transactions, so that isn't an issue I believe.

    Also, if monitortx is only for your own transactions, i believe its list of listeners should go in CWallet (at least for now), and the callback in CWallet::AddToWallet(). I intended the dispatch functions in main.cpp (incl. SyncWithWallets) to be replacable with a generic listener system one day, so i prefer them not to contain any real logic.

  5. New RPC calls: monitortx monitorblocks listmonitored getblock
    monitortx/monitorblocks: POST JSON-RPC to a URL when new wallet transactions or blocks are received.
    listmonitored: list URLS that will be POSTed to
    getblock: get information about a block, given depth in main chain.
    f62c6087a2
  6. gavinandresen commented at 1:15 PM on September 26, 2011: contributor

    Closing this for now; code is still in my github tree, but I'm working on what I think are higher-priority things right now.

  7. gavinandresen closed this on Sep 26, 2011

  8. gavinandresen deleted the branch on Nov 4, 2013
  9. btcdrak referenced this in commit f607d55aff on Nov 28, 2015
  10. kleetus referenced this in commit 803d69203a on Feb 5, 2016
  11. deadalnix referenced this in commit 6c98b61376 on Jan 5, 2017
  12. classesjack referenced this in commit 62a6952d3a on Jan 2, 2018
  13. attilaaf referenced this in commit 64897b27c4 on Jan 13, 2020
  14. cryptapus referenced this in commit 3be065ce03 on May 3, 2021
  15. rajarshimaitra referenced this in commit 5b3a4ab256 on Aug 5, 2021
  16. DrahtBot 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-04-13 21:16 UTC

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