lbrycrd/src/rpc
Wladimir J. van der Laan cd5e4381d4
Merge #12479: RPC: Add child transactions to getrawmempool verbose output
1dfb4e7d7 [Tests] Check output of parent/child tx list from getrawmempool, getmempooldescendants, getmempoolancestors, and REST interface (Conor Scott)
fc44cb108 [RPC] Add list of child transactions to verbose output of getrawmempool (Conor Scott)

Pull request description:

  `bitcoin-cli getrawmempool true` only lists a transaction's parents in the `depends` field. This change adds a `spentby` field to the json response, which lists the transaction's children in the mempool.

  Currently the only way to find child transactions is to use `getrawmempool` or make another call to `getmempooldescendants` and search the response for transactions that list the parent_txid in the `depends` list, which is inefficient.

  This change allows direct lookup of children.

  Example Output
  ```
    "9a9b5733c0d89f207908cfa3fe17809bee71f629aa095c9f8754524e29e98ba4": {
      ...other geterawmempool data...
      "wtxid": "9a9b5733c0d89f207908cfa3fe17809bee71f629aa095c9f8754524e29e98ba4",
      "depends": [
        "bdd92851d5766a42aeb62af667bb422a116cab4e032bba5e3dd6efe5b4b40aa0"
      ],
      "spentby": [
        "dc5d3ec388a9121421208738a041ac30a22163bc2e17758f2275b6c51a15ba7b"
      ]
    },
  ```

Tree-SHA512: 83da7d421c9799a40ef65af3b7fdb586d6d87385f3f2ede3afd2c311725444b858f9d91cc110422a0fa31905779934fee07211ca6fe6b746792b83692c94b3ce
2018-03-06 22:15:18 +01:00
..
blockchain.cpp Merge #12479: RPC: Add child transactions to getrawmempool verbose output 2018-03-06 22:15:18 +01:00
blockchain.h Remove unnecessary forward class declarations in header files 2017-06-12 20:37:43 +02:00
client.cpp Split signrawtransaction into wallet and non-wallet 2018-02-17 11:42:00 -05:00
client.h rpc: Named argument support for bitcoin-cli 2017-01-10 12:04:54 +01:00
mining.cpp Merge #12356: Fix 'mempool min fee not met' debug output 2018-02-15 16:35:42 +01:00
mining.h scripted-diff: Replace #include "" with #include <> (ryanofsky) 2017-11-16 08:23:01 +13:00
misc.cpp Merge #12503: [RPC] createmultisig no longer takes addresses 2018-02-21 17:01:26 -05:00
net.cpp fix version typo 2018-02-27 11:43:46 +01:00
protocol.cpp scripted-diff: Use UniValue.pushKV instead of push_back(Pair()) 2018-02-10 10:05:07 -05:00
protocol.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
rawtransaction.cpp Split signrawtransaction into wallet and non-wallet 2018-02-17 11:42:00 -05:00
rawtransaction.h Declare CMutableTransaction a struct in rawtransaction.h 2018-02-20 14:16:37 -08:00
register.h Do not shadow global RPC table variable (tableRPC) 2016-08-25 15:02:26 +02:00
safemode.cpp scripted-diff: Replace #include "" with #include <> (ryanofsky) 2017-11-16 08:23:01 +13:00
safemode.h rpc: Push down safe mode checks 2017-08-29 10:09:41 +02:00
server.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
server.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
util.cpp [rpc] Move DescribeAddressVisitor to rpc/util 2018-02-16 12:09:26 -05:00
util.h [rpc] Move DescribeAddressVisitor to rpc/util 2018-02-16 12:09:26 -05:00