Skip to content

refactor webserver services and responses (rebase on main) #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,575 changes: 925 additions & 650 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions chain/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
use core::fmt;
use std::fmt::Display;

use shared::log_config::LogConfig;

#[derive(clap::ValueEnum, Clone, Debug, Copy)]
pub enum CargoEnv {
Development,
Production,
}

impl Display for CargoEnv {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}

#[derive(clap::Parser)]
pub struct AppConfig {
#[clap(long, env)]
Expand Down
15 changes: 0 additions & 15 deletions governance/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
use core::fmt;
use std::fmt::Display;

use shared::log_config::LogConfig;

#[derive(clap::ValueEnum, Clone, Debug, Copy)]
pub enum CargoEnv {
Development,
Production,
}

impl Display for CargoEnv {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}

#[derive(clap::Parser)]
pub struct AppConfig {
#[clap(long, env)]
Expand Down
4 changes: 2 additions & 2 deletions orm/src/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::schema::blocks;
#[derive(Insertable, Clone, Queryable, Selectable, Debug)]
#[diesel(table_name = blocks)]
#[diesel(check_for_backend(diesel::pg::Pg))]
pub struct BlockInsertDb {
pub struct BlockDb {
pub height: i32,
pub hash: Option<String>,
pub app_hash: Option<String>,
Expand All @@ -16,7 +16,7 @@ pub struct BlockInsertDb {
pub epoch: Option<i32>,
}

pub type BlockDb = BlockInsertDb;
pub type BlockInsertDb = BlockDb;

impl From<(Block, TendermintBlockResponse)> for BlockInsertDb {
fn from(
Expand Down
15 changes: 0 additions & 15 deletions parameters/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
use core::fmt;
use std::fmt::Display;

use shared::log_config::LogConfig;

#[derive(clap::ValueEnum, Clone, Debug, Copy)]
pub enum CargoEnv {
Development,
Production,
}

impl Display for CargoEnv {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}

#[derive(clap::Parser)]
pub struct AppConfig {
#[clap(long, env)]
Expand Down
15 changes: 0 additions & 15 deletions pos/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
use core::fmt;
use std::fmt::Display;

use shared::log_config::LogConfig;

#[derive(clap::ValueEnum, Clone, Debug, Copy)]
pub enum CargoEnv {
Development,
Production,
}

impl Display for CargoEnv {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}

#[derive(clap::Parser)]
pub struct AppConfig {
#[clap(long, env)]
Expand Down
15 changes: 0 additions & 15 deletions rewards/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
use core::fmt;
use std::fmt::Display;

use shared::log_config::LogConfig;

#[derive(clap::ValueEnum, Clone, Debug, Copy)]
pub enum CargoEnv {
Development,
Production,
}

impl Display for CargoEnv {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}

#[derive(clap::Parser)]
pub struct AppConfig {
#[clap(long, env)]
Expand Down
Loading