File tree 2 files changed +23
-4
lines changed
2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -1563,7 +1563,7 @@ impl OutputCache {
1563
1563
| OrderAccountCommand :: FreezeOrder ( order_id)
1564
1564
| OrderAccountCommand :: ConcludeOrder ( order_id) => {
1565
1565
if let Some ( data) = self . orders . get_mut ( order_id) {
1566
- data. last_parent = find_parent ( & unconfirmed_descendants, tx_id. into ( ) ) ;
1566
+ data. last_parent = find_parent ( & self . unconfirmed_descendants , & tx_id) ;
1567
1567
}
1568
1568
}
1569
1569
} ,
@@ -1932,8 +1932,8 @@ fn uses_conflicting_nonce(
1932
1932
confirmed_account_type : AccountType ,
1933
1933
confirmed_nonce : AccountNonce ,
1934
1934
) -> bool {
1935
- unconfirmed_tx. inputs ( ) . iter ( ) . any ( |inp | match inp {
1936
- TxInput :: Utxo ( _) => false ,
1935
+ unconfirmed_tx. inputs ( ) . iter ( ) . any ( |input | match input {
1936
+ TxInput :: Utxo ( _) | TxInput :: OrderAccountCommand ( _ ) => false ,
1937
1937
TxInput :: AccountCommand ( nonce, cmd) => {
1938
1938
confirmed_account_type == cmd. into ( ) && * nonce <= confirmed_nonce
1939
1939
}
Original file line number Diff line number Diff line change @@ -7001,7 +7001,26 @@ fn conflicting_delegation_account_nonce_same_wallet(#[case] seed: Seed) {
7001
7001
#[ case( Seed :: from_entropy( ) ) ]
7002
7002
fn conflicting_order_account_nonce ( #[ case] seed : Seed ) {
7003
7003
let mut rng = make_seedable_rng ( seed) ;
7004
- let chain_config = Arc :: new ( create_unit_test_config ( ) ) ;
7004
+ let chain_config = common:: chain:: config:: create_unit_test_config_builder ( )
7005
+ . chainstate_upgrades (
7006
+ common:: chain:: NetUpgrades :: initialize ( vec ! [ (
7007
+ BlockHeight :: zero( ) ,
7008
+ common:: chain:: ChainstateUpgrade :: new(
7009
+ common:: chain:: TokenIssuanceVersion :: V1 ,
7010
+ common:: chain:: RewardDistributionVersion :: V1 ,
7011
+ common:: chain:: TokensFeeVersion :: V1 ,
7012
+ common:: chain:: DataDepositFeeVersion :: V1 ,
7013
+ common:: chain:: ChangeTokenMetadataUriActivated :: Yes ,
7014
+ common:: chain:: FrozenTokensValidationVersion :: V1 ,
7015
+ common:: chain:: HtlcActivated :: Yes ,
7016
+ common:: chain:: OrdersActivated :: Yes ,
7017
+ common:: chain:: OrdersVersion :: V0 ,
7018
+ ) ,
7019
+ ) ] )
7020
+ . expect ( "cannot fail" ) ,
7021
+ )
7022
+ . build ( ) ;
7023
+ let chain_config = Arc :: new ( chain_config) ;
7005
7024
7006
7025
let mut wallet = create_wallet ( chain_config. clone ( ) ) ;
7007
7026
You can’t perform that action at this time.
0 commit comments