Format fixes

This commit is contained in:
Dagur Valberg Johannsson 2024-01-05 14:21:50 +01:00
parent 61157dd65a
commit 0a07407546
No known key found for this signature in database
GPG key ID: FD701804AEE88107

View file

@ -3,7 +3,8 @@ use bitcoin_hashes::hex::ToHex;
use bitcoincash::{consensus::deserialize, Block};
use db::get_token_tvl;
use electrum_client::{Client, ElectrumApi, Param};
use riftenlabs_defi::cauldron::{ParsedContract, parse_cauldron};
use rayon::prelude::*;
use riftenlabs_defi::cauldron::{parse_cauldron, ParsedContract};
use rocket::{
get,
http::Status,
@ -28,7 +29,6 @@ use std::{
thread,
time::Duration,
};
use rayon::prelude::*;
use crate::{
chainutil::calculate_mtp,
@ -70,7 +70,7 @@ fn get_tip_height(client: &Client) -> anyhow::Result<i64> {
fn index_blocks(conn: Arc<Mutex<Connection>>, client: Arc<Mutex<Client>>) -> anyhow::Result<i64> {
let last_indexed =
config_get(&conn.lock().unwrap(), KEY_LAST_INDEXED)?.unwrap_or(GENESIS_BLOCK-1);
config_get(&conn.lock().unwrap(), KEY_LAST_INDEXED)?.unwrap_or(GENESIS_BLOCK - 1);
let tip_height = get_tip_height(&client.lock().unwrap())?;
let stop_height = tip_height - TRAIL_BEHIND_OFFSET;
@ -207,5 +207,7 @@ fn launch() -> _ {
}
});
rocket::build().manage(conn).mount("/cauldron/", routes![tvl])
rocket::build()
.manage(conn)
.mount("/cauldron/", routes![tvl])
}