@@ -11,7 +11,7 @@ pub mod protocol;
11
11
pub mod wrapper;
12
12
13
13
use std:: borrow:: Cow ;
14
- use std:: collections:: { BTreeMap , BTreeSet } ;
14
+ use std:: collections:: BTreeSet ;
15
15
use std:: fmt:: { self , Display } ;
16
16
use std:: marker:: PhantomData ;
17
17
use std:: str:: FromStr ;
@@ -22,6 +22,7 @@ use namada_core::address::Address;
22
22
use namada_core:: borsh:: {
23
23
BorshDeserialize , BorshSchema , BorshSerialize , BorshSerializeExt ,
24
24
} ;
25
+ use namada_core:: collections:: HashMap ;
25
26
use namada_core:: hash:: Hash ;
26
27
use namada_core:: storage;
27
28
use namada_events:: Event ;
@@ -227,7 +228,7 @@ pub struct DryRunResult(pub TxResult<String>, pub WholeGas);
227
228
// strings
228
229
// TODO derive BorshSchema after <https://github.com/near/borsh-rs/issues/82>
229
230
#[ derive( Clone , Debug , BorshSerialize , BorshDeserialize ) ]
230
- pub struct TxResult < T > ( pub BTreeMap < Hash , Result < BatchedTxResult , T > > ) ;
231
+ pub struct TxResult < T > ( pub HashMap < Hash , Result < BatchedTxResult , T > > ) ;
231
232
232
233
impl < T > Default for TxResult < T > {
233
234
fn default ( ) -> Self {
@@ -300,8 +301,8 @@ impl<'de, T: Deserialize<'de>> serde::Deserialize<'de> for TxResult<T> {
300
301
impl < T : Display > TxResult < T > {
301
302
/// Convert the batched result to a string
302
303
pub fn to_result_string ( self ) -> TxResult < String > {
303
- let mut batch_results: BTreeMap < Hash , Result < BatchedTxResult , String > > =
304
- BTreeMap :: new ( ) ;
304
+ let mut batch_results: HashMap < Hash , Result < BatchedTxResult , String > > =
305
+ HashMap :: new ( ) ;
305
306
306
307
for ( hash, res) in self . 0 {
307
308
let res = match res {
@@ -317,8 +318,8 @@ impl<T: Display> TxResult<T> {
317
318
318
319
impl < T > TxResult < T > {
319
320
/// Return a new set of tx results.
320
- pub const fn new ( ) -> Self {
321
- Self ( BTreeMap :: new ( ) )
321
+ pub fn new ( ) -> Self {
322
+ Self ( HashMap :: new ( ) )
322
323
}
323
324
324
325
/// Insert an inner tx result into this [`TxResult`].
0 commit comments