0

I know how to check when a specific transaction was included in the block. But how do I check when my bitcoind node first saw it? I would like to estimate for how long the transaction stayed unconfirmed after it was broadcasted.

2

The getrawmempool interface provides this information in the time field, though it is potentially very slow to respond with a large number of transactions in the mempool. It does not record this time once the transaction is removed from the mempool for non-wallet transactions, so it either needs to be gathered from this interface or recorded on addition with the zmq socket.

"result": {
    "89ee39117b4b55e54ace29c631eef80a875ae109a4fbd79ddd10b6f21329e88d": {
        "size": 225,
        "fee": 0.00000573,
        "modifiedfee": 0.00000573,
        "time": 1556802637,
        "height": 574268,
        "descendantcount": 2,
        "descendantsize": 451,
        "descendantfees": 3247,
        "ancestorcount": 1,
        "ancestorsize": 225,
        "ancestorfees": 573,
        "wtxid": "89ee39117b4b55e54ace29c631eef80a875ae109a4fbd79ddd10b6f21329e88d",
        "depends": [

        ]
    }
}
  • 3
    Doesn't getmempoolentry give the same information? – Pieter Wuille May 2 at 16:16
  • I assumed they wanted to do bulk analysis. – Anonymous May 2 at 16:43
  • Thank you both, these are the useful commands One clarification though: am I right that once the transaction is confirmed and gone from the mempool- there is no way to check when it was first seen? – Dmitry Laptev May 2 at 19:28
  • 2
    Yes, that information is not kept around. In fact, apart from historical blocks (and only when not pruning), nothing at all is kept around about confirmed transactions (in general you can't test whether a particular transaction was confirmed in the past). – Pieter Wuille May 2 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.