-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show the timestamp of the transaction in tx-pool through rpc #3938
Comments
The current ckb/util/types/src/core/tx_pool.rs Lines 102 to 116 in 98678a8
I think we can change /// Tx-pool transaction status
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum TxStatus {
/// Status "pending". The transaction is in the pool, and not proposed yet.
Pending(u64), // inner value is the timestamp when the tx enter the pool
/// Status "proposed". The transaction is in the pool and has been proposed.
Proposed(u64), // inner value is the timestamp when the tx enter the pool
/// Status "committed". The transaction has been committed to the canonical chain.
Committed(H256),
/// Status "unknown". The node has not seen the transaction,
/// or it should be rejected but was cleared due to storage limitations.
Unknown,
/// Status "rejected". The transaction has been recently removed from the pool.
/// Due to storage limitations, the node can only hold the most recently removed transactions.
Rejected(String),
} Cc. @zhangsoledad |
I would suggest adding an RPC like Bitcoin getmempoolentry. |
Agree, I would like to work on this. |
I recommend adding a field #[derive(Clone, Debug)]
pub struct TransactionWithStatus {
/// The transaction.
......
pub cycles: Option<core::Cycle>.
pub timestamp: Option<u64>.
} Instead of modifying the structure of TxStatus For json parser, |
#3894 added a timestamp to record the transaction when it entering the tx-pool, suggest to display this field in the
get_transaction
rpc, it's helpful to debug or re-send a long pending tx by checking this timestamp.The text was updated successfully, but these errors were encountered: