This commit is contained in:
Bryan Stitt 2023-06-16 23:48:16 -07:00
parent 745870d119
commit ba67151706
5 changed files with 6 additions and 6 deletions

@ -10,7 +10,7 @@ use axum::{
use entities::{admin, login, user, user_tier}; use entities::{admin, login, user, user_tier};
use ethers::prelude::Address; use ethers::prelude::Address;
use hashbrown::HashMap; use hashbrown::HashMap;
use log::{debug, info}; use log::{info, trace};
use migration::sea_orm::{ use migration::sea_orm::{
self, ActiveModelTrait, ColumnTrait, EntityTrait, IntoActiveModel, QueryFilter, self, ActiveModelTrait, ColumnTrait, EntityTrait, IntoActiveModel, QueryFilter,
}; };

@ -17,7 +17,7 @@ use axum::{
}; };
use http::{header::AUTHORIZATION, StatusCode}; use http::{header::AUTHORIZATION, StatusCode};
use listenfd::ListenFd; use listenfd::ListenFd;
use log::{debug, info}; use log::{info};
use moka::future::{Cache, CacheBuilder}; use moka::future::{Cache, CacheBuilder};
use std::net::SocketAddr; use std::net::SocketAddr;
use std::sync::Arc; use std::sync::Arc;

@ -18,7 +18,7 @@ use entities::{balance, login, pending_login, referee, referrer, rpc_key, user};
use ethers::{prelude::Address, types::Bytes}; use ethers::{prelude::Address, types::Bytes};
use hashbrown::HashMap; use hashbrown::HashMap;
use http::StatusCode; use http::StatusCode;
use log::{debug, trace, warn}; use log::{trace, warn};
use migration::sea_orm::prelude::{Decimal, Uuid}; use migration::sea_orm::prelude::{Decimal, Uuid};
use migration::sea_orm::{ use migration::sea_orm::{
self, ActiveModelTrait, ColumnTrait, DatabaseTransaction, EntityTrait, IntoActiveModel, self, ActiveModelTrait, ColumnTrait, DatabaseTransaction, EntityTrait, IntoActiveModel,

@ -9,7 +9,7 @@ use axum::{
use chrono::{NaiveDateTime, Utc}; use chrono::{NaiveDateTime, Utc};
use entities::login; use entities::login;
use hashbrown::HashMap; use hashbrown::HashMap;
use log::{debug, warn}; use log::{trace, warn};
use migration::sea_orm::{ColumnTrait, EntityTrait, QueryFilter}; use migration::sea_orm::{ColumnTrait, EntityTrait, QueryFilter};
use redis_rate_limiter::{redis::AsyncCommands, RedisConnection}; use redis_rate_limiter::{redis::AsyncCommands, RedisConnection};

@ -17,7 +17,7 @@ use derive_more::From;
use entities::sea_orm_active_enums::TrackingLevel; use entities::sea_orm_active_enums::TrackingLevel;
use entities::{balance, referee, referrer, rpc_accounting_v2, rpc_key}; use entities::{balance, referee, referrer, rpc_accounting_v2, rpc_key};
use influxdb2::models::DataPoint; use influxdb2::models::DataPoint;
use log::{debug, trace}; use log::trace;
use migration::sea_orm::prelude::Decimal; use migration::sea_orm::prelude::Decimal;
use migration::sea_orm::{ use migration::sea_orm::{
self, ColumnTrait, DatabaseConnection, EntityTrait, QueryFilter, TransactionTrait, self, ColumnTrait, DatabaseConnection, EntityTrait, QueryFilter, TransactionTrait,
@ -900,7 +900,7 @@ impl RpcQueryStats {
} }
// for now, always return a flat cost // for now, always return a flat cost
return Decimal::from_str("0.000018").unwrap(); Decimal::from_str("0.000018").unwrap()
/* /*
// TODO: get cost_minimum, cost_free_bytes, cost_per_byte, cache_hit_divisor from config. each chain will be different // TODO: get cost_minimum, cost_free_bytes, cost_per_byte, cache_hit_divisor from config. each chain will be different