soroban_sdk::testutils

Trait Ledger

source
pub trait Ledger {
    // Required methods
    fn set(&self, l: LedgerInfo);
    fn set_protocol_version(&self, protocol_version: u32);
    fn set_sequence_number(&self, sequence_number: u32);
    fn set_timestamp(&self, timestamp: u64);
    fn set_network_id(&self, network_id: [u8; 32]);
    fn set_base_reserve(&self, base_reserve: u32);
    fn set_min_temp_entry_ttl(&self, min_temp_entry_ttl: u32);
    fn set_min_persistent_entry_ttl(&self, min_persistent_entry_ttl: u32);
    fn set_max_entry_ttl(&self, max_entry_ttl: u32);
    fn get(&self) -> LedgerInfo;
    fn with_mut<F>(&self, f: F)
       where F: FnMut(&mut LedgerInfo);
}
Available on crate feature testutils only.
Expand description

Test utilities for Ledger.

Required Methods§

source

fn set(&self, l: LedgerInfo)

Set ledger info.

source

fn set_protocol_version(&self, protocol_version: u32)

Sets the protocol version.

source

fn set_sequence_number(&self, sequence_number: u32)

Sets the sequence number.

source

fn set_timestamp(&self, timestamp: u64)

Sets the timestamp.

source

fn set_network_id(&self, network_id: [u8; 32])

Sets the network ID.

source

fn set_base_reserve(&self, base_reserve: u32)

Sets the base reserve.

source

fn set_min_temp_entry_ttl(&self, min_temp_entry_ttl: u32)

Sets the minimum temporary entry time-to-live.

source

fn set_min_persistent_entry_ttl(&self, min_persistent_entry_ttl: u32)

Sets the minimum persistent entry time-to-live.

source

fn set_max_entry_ttl(&self, max_entry_ttl: u32)

Sets the maximum entry time-to-live.

source

fn get(&self) -> LedgerInfo

Get ledger info.

source

fn with_mut<F>(&self, f: F)
where F: FnMut(&mut LedgerInfo),

Modify the ledger info.

Object Safety§

This trait is not object safe.

Implementors§