Skip to content

Commit 49fadd1

Browse files
committed
chain(fix): conflict resolution for txs with same last_seen
1 parent 2e4bc3c commit 49fadd1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/chain/src/tx_graph.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,12 @@ impl<A: Anchor> TxGraph<A> {
789789
if conflicting_tx.last_seen_unconfirmed > tx_last_seen {
790790
return Ok(None);
791791
}
792+
if conflicting_tx.last_seen_unconfirmed == *last_seen
793+
&& conflicting_tx.txid() > tx.txid()
794+
{
795+
// Conflicting tx has priority if txid of conflicting tx > txid of original tx
796+
return Ok(None);
797+
}
792798
}
793799
}
794800

0 commit comments

Comments
 (0)