Skip to content

Commit

Permalink
chain(fix): conflict resolution for txs with same last_seen
Browse files Browse the repository at this point in the history
  • Loading branch information
LagginTimes committed Oct 28, 2023
1 parent 2e4bc3c commit 49fadd1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/chain/src/tx_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,12 @@ impl<A: Anchor> TxGraph<A> {
if conflicting_tx.last_seen_unconfirmed > tx_last_seen {
return Ok(None);
}
if conflicting_tx.last_seen_unconfirmed == *last_seen
&& conflicting_tx.txid() > tx.txid()
{
// Conflicting tx has priority if txid of conflicting tx > txid of original tx
return Ok(None);
}
}
}

Expand Down

0 comments on commit 49fadd1

Please sign in to comment.