1- use std:: collections:: HashMap ;
1+ use std:: collections:: BTreeMap ;
22
33use katana_primitives:: contract:: Nonce ;
44use katana_primitives:: transaction:: TxHash ;
@@ -37,9 +37,9 @@ pub struct TxPoolTransaction {
3737#[ derive( Debug , Clone , Serialize , Deserialize ) ]
3838pub struct TxPoolContent {
3939 /// Transactions ready for execution, keyed by sender then nonce.
40- pub pending : HashMap < ContractAddress , HashMap < Nonce , TxPoolTransaction > > ,
40+ pub pending : BTreeMap < ContractAddress , BTreeMap < Nonce , TxPoolTransaction > > ,
4141 /// Transactions waiting on a nonce gap. Always empty for now.
42- pub queued : HashMap < ContractAddress , HashMap < Nonce , TxPoolTransaction > > ,
42+ pub queued : BTreeMap < ContractAddress , BTreeMap < Nonce , TxPoolTransaction > > ,
4343}
4444
4545/// Response for `txpool_inspect`.
@@ -50,7 +50,7 @@ pub struct TxPoolContent {
5050#[ derive( Debug , Clone , Serialize , Deserialize ) ]
5151pub struct TxPoolInspect {
5252 /// Textual summaries of pending transactions, keyed by sender then nonce.
53- pub pending : HashMap < ContractAddress , HashMap < Nonce , String > > ,
53+ pub pending : BTreeMap < ContractAddress , BTreeMap < Nonce , String > > ,
5454 /// Textual summaries of queued transactions. Always empty for now.
55- pub queued : HashMap < ContractAddress , HashMap < Nonce , String > > ,
55+ pub queued : BTreeMap < ContractAddress , BTreeMap < Nonce , String > > ,
5656}
0 commit comments