Skip to content

Commit

Permalink
Merge branch 'develop' into devx/add-package-manager-install-instruct…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
lucas-tortora authored Nov 14, 2024
2 parents 7de6f88 + d107243 commit cf323cd
Show file tree
Hide file tree
Showing 9 changed files with 649 additions and 70 deletions.
2 changes: 1 addition & 1 deletion crates/iota-indexer/database_schema.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
167 changes: 127 additions & 40 deletions crates/iota-indexer/schema.md

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions crates/iota-indexer/src/indexer_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ use crate::{
},
schema::{
address_metrics, checkpoints, display, epochs, events, move_call_metrics, objects,
objects_snapshot, transactions,
objects_snapshot, packages, transactions,
},
store::{diesel_macro::*, package_resolver::IndexerStorePackageResolver},
types::{IndexerResult, OwnerType},
Expand Down Expand Up @@ -1509,10 +1509,17 @@ impl<U: R2D2Connection> IndexerReader<U> {
}

pub fn get_latest_network_metrics(&self) -> IndexerResult<NetworkMetrics> {
let metrics = run_query!(&self.pool, |conn| {
let mut metrics = run_query!(&self.pool, |conn| {
diesel::sql_query("SELECT * FROM network_metrics;")
.get_result::<StoredNetworkMetrics>(conn)
})?;
if metrics.total_packages == -1 {
// this implies that the estimate is not available in the db
// so we fallback to the more expensive count query
metrics.total_packages = run_query!(&self.pool, |conn| {
packages::dsl::packages.count().get_result::<i64>(conn)
})?;
}
Ok(metrics.into())
}

Expand Down
2 changes: 1 addition & 1 deletion crates/iota-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This crate provides the IOTA Rust SDK, containing APIs to interact with the IOTA network. Auto-generated documentation for this crate is [here](https://github.com/iotaledger/iota/iota_sdk/index.html).
This crate provides the IOTA Rust SDK, containing APIs to interact with the IOTA network. Auto-generated documentation for this crate is [here](https://iotaledger.github.io/iota/iota_sdk/index.html).

## Getting started

Expand Down
1 change: 1 addition & 0 deletions docker/fullnode/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
volumes:
- ./fullnode-template.yaml:/opt/iota/config/fullnode.yaml:ro
- ./genesis.blob:/opt/iota/config/genesis.blob:ro
- ./migration.blob:/opt/iota/config/migration.blob:ro
- ./iotadb:/opt/iota/db:rw
command: [
"/opt/iota/bin/iota-node",
Expand Down
Loading

0 comments on commit cf323cd

Please sign in to comment.