We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
store_transactions
1 parent ca5242c commit 82aec88Copy full SHA for 82aec88
mithril-aggregator/src/database/repository/cardano_transaction_repository.rs
@@ -242,12 +242,14 @@ impl TransactionStore for CardanoTransactionRepository {
242
}
243
244
async fn store_transactions(&self, transactions: Vec<CardanoTransaction>) -> StdResult<()> {
245
+ self.connection.execute("BEGIN TRANSACTION;")?;
246
// Chunk transactions to avoid an error when we exceed sqlite binding limitations
247
for transactions_in_chunk in transactions.chunks(100) {
248
self.create_transactions(transactions_in_chunk.to_vec())
249
.await
250
.with_context(|| "CardanoTransactionRepository can not store transactions")?;
251
252
+ self.connection.execute("END TRANSACTION;")?;
253
Ok(())
254
255
0 commit comments