chain(fix): conflict resolution for txs with same last_seen

The tx conflict `Scenario` test for unconfirmed txs with the same
last_seen has been amended for its corresponding conflict
resolution bug fix.
This commit is contained in:
Wei Chen committed 2023-11-09 05:46:09 +08:00
1 parent 2f2f138595
commit afbf83c8b0
2 files changed
+11 -7

No files matched your search

+6
View File
@@ -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);
}
}
}