From 03df6b8528ba7b1852e79aebb88c77907cf69afa Mon Sep 17 00:00:00 2001 From: 0o-de-lally <1364012+0o-de-lally@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:48:47 -0500 Subject: [PATCH] names --- src/load_exchange_orders.rs | 6 +++--- tests/test_analytics.rs | 6 +++--- tests/test_enrich_exchange.rs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/load_exchange_orders.rs b/src/load_exchange_orders.rs index 6bc4109..c0d0452 100644 --- a/src/load_exchange_orders.rs +++ b/src/load_exchange_orders.rs @@ -10,7 +10,7 @@ use crate::{ schema_exchange_orders::ExchangeOrder, }; -pub async fn swap_batch( +pub async fn exchange_txs_batch( txs: &[ExchangeOrder], pool: &Graph, batch_size: usize, @@ -99,7 +99,7 @@ pub async fn load_from_json(path: &Path, pool: &Graph, batch_size: usize) -> Res let mut balances = BalanceTracker::new(); balances.replay_transactions(&mut orders)?; let ledger_inserts = balances.submit_ledger(pool).await?; - info!("exchange ledger relations inserted: {}", ledger_inserts); + info!("exchange UserLedger relations inserted: {}", ledger_inserts); - swap_batch(&orders, pool, batch_size).await + exchange_txs_batch(&orders, pool, batch_size).await } diff --git a/tests/test_analytics.rs b/tests/test_analytics.rs index 1875bd6..8076e37 100644 --- a/tests/test_analytics.rs +++ b/tests/test_analytics.rs @@ -30,7 +30,7 @@ async fn test_rms_single() -> Result<()> { assert!(orders.len() == 25450); // load 1000 orders - load_exchange_orders::swap_batch(&orders[..1000], &graph, 1000).await?; + load_exchange_orders::exchange_txs_batch(&orders[..1000], &graph, 1000).await?; // get just one analytics result, never more than one (but can be empty) let list = analytics::exchange_stats::query_rms_analytics_chunk(&graph, 900, 1, false).await?; @@ -60,7 +60,7 @@ async fn test_rms_single_persist() -> Result<()> { assert!(orders.len() == 25450); // load 1000 orders - load_exchange_orders::swap_batch(&orders[..1000], &graph, 1000).await?; + load_exchange_orders::exchange_txs_batch(&orders[..1000], &graph, 1000).await?; // get just one analytics result, never more than one (but can be empty) let list = analytics::exchange_stats::query_rms_analytics_chunk(&graph, 900, 1, true).await?; @@ -90,7 +90,7 @@ async fn test_rms_batch() -> Result<()> { assert!(orders.len() == 25450); // load 1000 orders - load_exchange_orders::swap_batch(&orders[..1000], &graph, 1000).await?; + load_exchange_orders::exchange_txs_batch(&orders[..1000], &graph, 1000).await?; let list = analytics::exchange_stats::query_rms_analytics_concurrent(&graph, None, None, false) .await?; diff --git a/tests/test_enrich_exchange.rs b/tests/test_enrich_exchange.rs index a87b94a..1ba5397 100644 --- a/tests/test_enrich_exchange.rs +++ b/tests/test_enrich_exchange.rs @@ -141,7 +141,7 @@ async fn e2e_swap_data() -> Result<()> { assert!(orders.len() == 25450); // load 1000 orders - load_exchange_orders::swap_batch(&orders[..1000], &graph, 1000).await?; + load_exchange_orders::exchange_txs_batch(&orders[..1000], &graph, 1000).await?; // now check data was loaded let mut result = graph