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.
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-
gavinandresen commented at 3:29 PM on May 6, 2011: contributor
-
gavinandresen commented at 3:46 PM on May 6, 2011: contributor
Forum thread: http://www.bitcoin.org/smf/index.php?topic=7421
-
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.
-
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.
-
f62c6087a2
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.
-
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.
- gavinandresen closed this on Sep 26, 2011
- gavinandresen deleted the branch on Nov 4, 2013
- btcdrak referenced this in commit f607d55aff on Nov 28, 2015
- kleetus referenced this in commit 803d69203a on Feb 5, 2016
- deadalnix referenced this in commit 6c98b61376 on Jan 5, 2017
- classesjack referenced this in commit 62a6952d3a on Jan 2, 2018
- attilaaf referenced this in commit 64897b27c4 on Jan 13, 2020
- cryptapus referenced this in commit 3be065ce03 on May 3, 2021
- rajarshimaitra referenced this in commit 5b3a4ab256 on Aug 5, 2021
- DrahtBot locked this on Sep 8, 2021