pub struct Config {
pub wait_up_to: BlockCount,
pub wait_for: BlockCount,
pub mx_lock_duration: BlockCount,
pub system_reserve: u64,
/* private fields */
}
Expand description
The set of broadly used internal parameters.
These parameters have various predefined values that the program developer can override.
Fields§
§wait_up_to: BlockCount
Default wait duration for wait_up_to
messages expressed in block
count.
Initial value: 100 blocks
wait_for: BlockCount
Default wait duration for wait_for
messages expressed in block count.
Initial value: 100 blocks
mx_lock_duration: BlockCount
Default amount of blocks a mutex lock can be owned for by a message.
Initial value: 100 blocks
system_reserve: u64
Default gas amount reserved for system purposes.
Initial value: 1_000_000_000
Implementations§
source§impl Config
impl Config
sourcepub fn wait_for() -> BlockCount
pub fn wait_for() -> BlockCount
Get the wait_for
duration (in blocks).
sourcepub fn wait_up_to() -> BlockCount
pub fn wait_up_to() -> BlockCount
Get the wait_up_to
duration (in blocks).
sourcepub fn mx_lock_duration() -> BlockCount
pub fn mx_lock_duration() -> BlockCount
Get the mx_lock_duration
duration (in blocks).
sourcepub fn system_reserve() -> u64
pub fn system_reserve() -> u64
Get the system_reserve
gas amount.
sourcepub fn set_wait_for(duration: BlockCount) -> Result<()>
pub fn set_wait_for(duration: BlockCount) -> Result<()>
Set wait_for
duration (in blocks).
sourcepub fn set_default_wait_for(duration: BlockCount) -> Result<()>
pub fn set_default_wait_for(duration: BlockCount) -> Result<()>
Set wait_for
as the default wait type with duration.
Calling this function forces all async functions that wait for some
condition to wait exactly for duration
blocks.
sourcepub fn set_wait_up_to(duration: BlockCount) -> Result<()>
pub fn set_wait_up_to(duration: BlockCount) -> Result<()>
Set the wait_up_to
duration (in blocks).
sourcepub fn set_default_wait_up_to(duration: BlockCount) -> Result<()>
pub fn set_default_wait_up_to(duration: BlockCount) -> Result<()>
Set wait_up_to
as the default wait type with duration.
Calling this function forces all async functions that wait for some
condition to wait not more than duration
blocks.
sourcepub fn set_mx_lock_duration(duration: BlockCount) -> Result<()>
pub fn set_mx_lock_duration(duration: BlockCount) -> Result<()>
Set mx_lock_duration_max
duration (in blocks).
sourcepub fn set_system_reserve(amount: u64) -> Result<()>
pub fn set_system_reserve(amount: u64) -> Result<()>
Set system_reserve
gas amount.