Skip to content

Commit 1abad17

Browse files
committed
Change order of retrieval of cardano transactions
From `rowid` to `block_number then transaction_hash`. The goal is to have a consistent order accross nodes that resist order of insertion.
1 parent 95b8fb9 commit 1abad17

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mithril-aggregator/src/database/provider/cardano_transaction/get_cardano_transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl<'client> Provider<'client> for GetCardanoTransactionProvider<'client> {
8787
let aliases = SourceAlias::new(&[("{:cardano_tx:}", "cardano_tx")]);
8888
let projection = Self::Entity::get_projection().expand(aliases);
8989

90-
format!("select {projection} from cardano_tx where {condition} order by rowid")
90+
format!("select {projection} from cardano_tx where {condition} order by block_number, transaction_hash")
9191
}
9292
}
9393

mithril-signer/src/database/provider/cardano_transaction/get_cardano_transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<'client> Provider<'client> for GetCardanoTransactionProvider<'client> {
6969
let aliases = SourceAlias::new(&[("{:cardano_tx:}", "cardano_tx")]);
7070
let projection = Self::Entity::get_projection().expand(aliases);
7171

72-
format!("select {projection} from cardano_tx where {condition} order by rowid")
72+
format!("select {projection} from cardano_tx where {condition} order by block_number, transaction_hash")
7373
}
7474
}
7575

0 commit comments

Comments
 (0)