Struct solana::bank::Bank[][src]

pub struct Bank {
    pub is_leader: bool,
    // some fields omitted
}

The state of all accounts and contracts after processing its entries.

Fields

This bool allows us to submit metrics that are specific for leaders or validators It is set to true by fullnode before creating the bank.

Methods

impl Bank
[src]

Create a default Bank

Create an Bank using a deposit.

Create an Bank with only a Mint. Typically used by unit tests.

Return the last entry ID registered.

Forget all signatures. Useful for benchmarking.

Look through the last_ids and find all the valid ids This is batched to avoid holding the lock for a significant amount of time

Return a vec of tuple of (valid index, timestamp) index is into the passed ids slice to avoid copying hashes

Tell the bank which Entry IDs exist on the ledger. This function assumes subsequent calls correspond to later entries, and will boot the oldest ones once its internal cache is full. Once boot, the bank will reject transactions using that last_id.

Process a Transaction. If it contains a payment plan that requires a witness to progress, the payment plan will be stored in the bank.

Process a batch of transactions.

Process an ordered list of entries.

Process a full ledger.

Create, sign, and process a Transaction from keypair to to of n tokens where last_id is the last Entry ID observed by the client.

Create, sign, and process a postdated Transaction from keypair to to of n tokens on dt where last_id is the last Entry ID observed by the client.

Trait Implementations

impl Default for Bank
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Bank

impl Sync for Bank