Struct parables_testing::ledger::Ledger  [−][src]
pub struct Ledger<S> where
    S: LedgerState,  { /* fields omitted */ }Methods
impl<'a> Ledger<AccountBalance<'a>>[src] 
impl<'a> Ledger<AccountBalance<'a>>pub fn account_balance(evm: &'a Evm) -> Ledger<AccountBalance<'a>>[src] 
pub fn account_balance(evm: &'a Evm) -> Ledger<AccountBalance<'a>>Construct a new empty ledger that doesn't have any specialized state.
impl<S> Ledger<S> where
    S: LedgerState, [src] 
impl<S> Ledger<S> where
    S: LedgerState, pub fn new(state: S) -> Ledger<S>[src] 
pub fn new(state: S) -> Ledger<S>Construct a new ledger.
To construct a ledger without state, use Ledger::empty().
pub fn sync(&mut self, address: Address) -> Result<(), Error>[src] 
pub fn sync(&mut self, address: Address) -> Result<(), Error>Synchronize the ledger against the current state of the virtual machine.
pub fn sync_all(&mut self, addresses: Vec<Address>) -> Result<(), Error>[src] 
pub fn sync_all(&mut self, addresses: Vec<Address>) -> Result<(), Error>Sync multiple addresses.
pub fn verify(self) -> Result<(), Error>[src] 
pub fn verify(self) -> Result<(), Error>Go through each registered account, and verify their invariants.
pub fn entry(&mut self, address: Address) -> &mut S::Entry[src] 
pub fn entry(&mut self, address: Address) -> &mut S::EntryAccess the mutable state for the given address.
impl<S> Ledger<S> where
    S: LedgerState<Entry = U256>, [src] 
impl<S> Ledger<S> where
    S: LedgerState<Entry = U256>, pub fn add<V>(&mut self, address: Address, value: V) where
    V: Into<U256>, [src] 
pub fn add<V>(&mut self, address: Address, value: V) where
    V: Into<U256>, Add to the balance for the given address.
pub fn sub<V>(&mut self, address: Address, value: V) where
    V: Into<U256>, [src] 
pub fn sub<V>(&mut self, address: Address, value: V) where
    V: Into<U256>, Subtract from the balance for the given address.