Skip to content

Commit fe9754f

Browse files
committed
feat(json_rpc): include stake and unstake transactions in GetMempool
1 parent d61cb0b commit fe9754f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

node/src/actors/chain_manager/handlers.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1996,6 +1996,8 @@ impl Handler<GetMempool> for ChainManager {
19961996
let res = GetMempoolResult {
19971997
value_transfer: self.transactions_pool.vt_iter().map(|t| t.hash()).collect(),
19981998
data_request: self.transactions_pool.dr_iter().map(|t| t.hash()).collect(),
1999+
stake: self.transactions_pool.st_iter().map(|t| t.hash()).collect(),
2000+
unstake: self.transactions_pool.ut_iter().map(|t| t.hash()).collect(),
19992001
};
20002002

20012003
Ok(res)

node/src/actors/messages.rs

+4
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,10 @@ pub struct GetMempoolResult {
625625
pub value_transfer: Vec<Hash>,
626626
/// Pending data request transactions
627627
pub data_request: Vec<Hash>,
628+
/// Pending stake transactions
629+
pub stake: Vec<Hash>,
630+
/// Pending unstake transactions
631+
pub unstake: Vec<Hash>,
628632
}
629633

630634
/// Try to mine a block: signal the ChainManager to check if it can produce a new block

0 commit comments

Comments
 (0)