[][src]Struct avrio_config::Config

pub struct Config {
    pub version_major: u8,
    pub version_breaking: u8,
    pub version_minor: u8,
    pub coin_name: String,
    pub db_path: String,
    pub node_drop_off_threshold: u8,
    pub decimal_places: u8,
    pub max_connections: u16,
    pub max_threads: u8,
    pub chain_key: String,
    pub state: u8,
    pub ip_host: String,
    pub seednodes: Vec<String>,
    pub ignore_minor_updates: bool,
    pub p2p_port: u16,
    pub rpc_port: u16,
    pub allow_cors: char,
    pub buffer_bytes: u16,
    pub network_id: Vec<u8>,
    pub node_type: char,
    pub identitiy: String,
    pub key_file_path: String,
    pub log_level: u8,
    pub min_intrest: f32,
    pub max_intrest: f32,
    pub max_reward: u32,
    pub min_vote: u8,
    pub probatory_epoch_count: u8,
    pub certificateDifficulty: u64,
    pub fullnode_lock_amount: u64,
    pub transactionTimestampMaxOffset: u32,
    pub max_time_to_live: u64,
    pub target_epoch_length: u64,
    pub username_burn_amount: u64,
    pub fullnode_lock_time: u64,
    pub first_block_hash: String,
    pub wallet_password: String,
}

This is the entire config - this is what is passed arround in software and what you should use in anything your build

Fields

version_major: u8version_breaking: u8version_minor: u8coin_name: Stringdb_path: Stringnode_drop_off_threshold: u8decimal_places: u8max_connections: u16max_threads: u8chain_key: Stringstate: u8ip_host: Stringseednodes: Vec<String>ignore_minor_updates: boolp2p_port: u16rpc_port: u16allow_cors: charbuffer_bytes: u16network_id: Vec<u8>node_type: charidentitiy: Stringkey_file_path: Stringlog_level: u8min_intrest: f32max_intrest: f32max_reward: u32min_vote: u8probatory_epoch_count: u8certificateDifficulty: u64fullnode_lock_amount: u64transactionTimestampMaxOffset: u32max_time_to_live: u64target_epoch_length: u64username_burn_amount: u64fullnode_lock_time: u64first_block_hash: Stringwallet_password: String

Methods

impl Config[src]

pub fn toSave(self) -> ConfigSave[src]

pub fn create(self) -> Result<()>[src]

This creates a config file from the provided struct, if the file exists it does the same thing as save()

pub fn save(self) -> Result<()>[src]

This is how you save the config, it is a expensive function on devices with slow storage as it opens and writes to the file

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl Default for Config[src]

impl<'de> Deserialize<'de> for Config[src]

impl PartialEq<Config> for Config[src]

impl PartialOrd<Config> for Config[src]

impl Serialize for Config[src]

impl StructuralPartialEq for Config[src]

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.