7

Block explorer explorer.xmr.my shows the contents of the memory pool. Does monerod, monero-wallet-cli or another CLI utility allow to query the Monero's memory pool? If so, how?

seek adventure
  • 2,239
  • 14
  • 52
dpzz
  • 4,539
  • 4
  • 22
  • 46

1 Answers1

3

monerod has a get_transaction_pool RPC call:

curl -X POST http://127.0.0.1:18081/get_transaction_pool -d '{}' -H 'Content-Type: application/json'

This will return the current state of the tx pool. Each transaction in the pool has this information:

std::string id_hash; std::string tx_json; // TODO - expose this data directly uint64_t blob_size; uint64_t fee; std::string max_used_block_id_hash; uint64_t max_used_block_height; bool kept_by_block; uint64_t last_failed_height; std::string last_failed_id_hash; uint64_t receive_time; bool relayed; uint64_t last_relayed_time;

monero-wallet-cli has a get_transfers RPC call. This can be configured to return transactions in the pool going to the wallet, by setting "pool" to true:

curl -X POST http://127.0.0.1:1234/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_transfers","params":{"in":false,"out":true,"pending":false,"failed":false,"pool":true,"min_height":735000,"max_height":1000000,"filter_by_height":true}}' -H 'Content-Type: application/json'

This will return this information for every transaction:

std::string txid; std::string payment_id; uint64_t height; uint64_t timestamp; uint64_t amount; uint64_t fee; std::string note; std::list<transfer_destination> destinations;

Note that some information may or may not be present. For example, destinations is not known for incoming transactions (sush as those incoming transactions found in the pool).

user36303
  • 34,928
  • 2
  • 58
  • 123