Pages:
Author

Topic: [PULL] monitortx monitorblocks listmonitored getblock - page 2. (Read 4291 times)

hero member
Activity: 588
Merit: 500
Please do clean this up and merge it (it doesn't apply cleanly to 0.3.22 as is, thanks to some namespace issues).
hero member
Activity: 588
Merit: 500
Ooooo, I really could use monitortx and monitorblock.

I presume monitortx is sending info on transactions received but not yet incorporated into a block?
legendary
Activity: 1652
Merit: 2311
Chief Scientist
The only reason I can think of is it relies on the boost::xpressive regular expression parsing .hpp, and that slows down the build.

I did refactor most of this into a rpcmonitor.cpp file; rpc.cpp was getting huge, and was taking a ton of memory and time to compile.
legendary
Activity: 1072
Merit: 1189
Any good reason not to merge this?
legendary
Activity: 1652
Merit: 2311
Chief Scientist
This has been lingering for months, and got bogged down in discussions of some nifty new mega-efficient binary protocol for stuff.  That hasn't happened.  So:  https://github.com/bitcoin/bitcoin/pull/198

This adds these new RPC commands:

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.

monitortx posts the same information you get from gettransaction.
monitorblock/getblock posts:
Code:
{
    "hash" : "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048",
    "blockcount" : 1,
    "version" : 1,
    "merkleroot" : "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098",
    "time" : 1231469665,
    "nonce" : 2573394689,
    "difficulty" : 1.00000000,
    "tx" : [
        "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098"
    ],
    "hashprevious" : "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
    "hashnext" : "000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd"
}


Pages:
Jump to: