File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
wallet/src/account/output_cache Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -834,9 +834,17 @@ impl OutputCache {
834
834
) ;
835
835
Ok ( ( ) )
836
836
}
837
- TxState :: Abandoned
838
- | TxState :: Confirmed ( ..)
839
- | TxState :: Conflicted ( ..) => {
837
+ TxState :: Conflicted ( ..) => {
838
+ // It's possible to try to mark descendant as conflicting twice
839
+ // because unconfirmed_descendants contains a tx as child and as parent.
840
+ // So it's not an error only if done during this function call.
841
+ ensure ! (
842
+ conflicting_txs_with_descendants. contains( & tx_id) ,
843
+ WalletError :: CannotMarkTxAsConflictedIfInState ( * tx. state( ) )
844
+ ) ;
845
+ Ok ( ( ) )
846
+ }
847
+ TxState :: Abandoned | TxState :: Confirmed ( ..) => {
840
848
Err ( WalletError :: CannotMarkTxAsConflictedIfInState ( * tx. state ( ) ) )
841
849
}
842
850
} ,
You can’t perform that action at this time.
0 commit comments