[−][src]Struct solana_runtime::accounts::Accounts
This structure handles synchronization for db
Fields
slot: Slot
my slot
epoch: Epoch
my epoch
accounts_db: Arc<AccountsDB>
Single global AccountsDB
Implementations
impl Accounts
[src]
pub fn new(paths: Vec<PathBuf>, cluster_type: &ClusterType) -> Self
[src]
pub fn new_from_parent(
parent: &Accounts,
slot: Slot,
parent_slot: Slot,
epoch: Epoch
) -> Self
[src]
parent: &Accounts,
slot: Slot,
parent_slot: Slot,
epoch: Epoch
) -> Self
pub fn has_duplicates<T: PartialEq>(xs: &[T]) -> bool
[src]
Return true if the slice has any duplicate elements
pub fn load_accounts(
&self,
ancestors: &Ancestors,
txs: &[Transaction],
txs_iteration_order: Option<&[usize]>,
lock_results: Vec<TransactionCheckResult>,
hash_queue: &BlockhashQueue,
error_counters: &mut ErrorCounters,
rent_collector: &RentCollector,
feature_set: &FeatureSet
) -> Vec<TransactionLoadResult>
[src]
&self,
ancestors: &Ancestors,
txs: &[Transaction],
txs_iteration_order: Option<&[usize]>,
lock_results: Vec<TransactionCheckResult>,
hash_queue: &BlockhashQueue,
error_counters: &mut ErrorCounters,
rent_collector: &RentCollector,
feature_set: &FeatureSet
) -> Vec<TransactionLoadResult>
pub fn load_slow(
&self,
ancestors: &Ancestors,
pubkey: &Pubkey
) -> Option<(Account, Slot)>
[src]
&self,
ancestors: &Ancestors,
pubkey: &Pubkey
) -> Option<(Account, Slot)>
Slow because lock is held for 1 operation instead of many
pub fn load_by_program_slot(
&self,
slot: Slot,
program_id: Option<&Pubkey>
) -> Vec<(Pubkey, Account)>
[src]
&self,
slot: Slot,
program_id: Option<&Pubkey>
) -> Vec<(Pubkey, Account)>
pub fn load_largest_accounts(
&self,
ancestors: &Ancestors,
num: usize,
filter_by_address: &HashSet<Pubkey>,
filter: AccountAddressFilter
) -> Vec<(Pubkey, u64)>
[src]
&self,
ancestors: &Ancestors,
num: usize,
filter_by_address: &HashSet<Pubkey>,
filter: AccountAddressFilter
) -> Vec<(Pubkey, u64)>
pub fn calculate_capitalization(
&self,
ancestors: &Ancestors,
simple_capitalization_enabled: bool
) -> u64
[src]
&self,
ancestors: &Ancestors,
simple_capitalization_enabled: bool
) -> u64
#[must_use]pub fn verify_bank_hash_and_lamports(
&self,
slot: Slot,
ancestors: &Ancestors,
total_lamports: u64,
simple_capitalization_enabled: bool
) -> bool
[src]
&self,
slot: Slot,
ancestors: &Ancestors,
total_lamports: u64,
simple_capitalization_enabled: bool
) -> bool
pub fn load_by_program(
&self,
ancestors: &Ancestors,
program_id: &Pubkey
) -> Vec<(Pubkey, Account)>
[src]
&self,
ancestors: &Ancestors,
program_id: &Pubkey
) -> Vec<(Pubkey, Account)>
pub fn load_all(&self, ancestors: &Ancestors) -> Vec<(Pubkey, Account, Slot)>
[src]
pub fn load_to_collect_rent_eagerly<R: RangeBounds<Pubkey>>(
&self,
ancestors: &Ancestors,
range: R
) -> Vec<(Pubkey, Account)>
[src]
&self,
ancestors: &Ancestors,
range: R
) -> Vec<(Pubkey, Account)>
pub fn store_slow(&self, slot: Slot, pubkey: &Pubkey, account: &Account)
[src]
Slow because lock is held for 1 operation instead of many
pub fn bank_hash_at(&self, slot: Slot) -> Hash
[src]
pub fn bank_hash_info_at(&self, slot: Slot) -> BankHashInfo
[src]
#[must_use]pub fn lock_accounts(
&self,
txs: &[Transaction],
txs_iteration_order: Option<&[usize]>
) -> Vec<Result<()>>
[src]
&self,
txs: &[Transaction],
txs_iteration_order: Option<&[usize]>
) -> Vec<Result<()>>
This function will prevent multiple threads from modifying the same account state at the same time
pub fn unlock_accounts(
&self,
txs: &[Transaction],
txs_iteration_order: Option<&[usize]>,
results: &[Result<()>]
)
[src]
&self,
txs: &[Transaction],
txs_iteration_order: Option<&[usize]>,
results: &[Result<()>]
)
Once accounts are unlocked, new transactions that modify that state can enter the pipeline
pub fn store_accounts(
&self,
slot: Slot,
txs: &[Transaction],
txs_iteration_order: Option<&[usize]>,
res: &[TransactionExecutionResult],
loaded: &mut [TransactionLoadResult],
rent_collector: &RentCollector,
last_blockhash_with_fee_calculator: &(Hash, FeeCalculator),
fix_recent_blockhashes_sysvar_delay: bool,
rent_fix_enabled: bool
)
[src]
&self,
slot: Slot,
txs: &[Transaction],
txs_iteration_order: Option<&[usize]>,
res: &[TransactionExecutionResult],
loaded: &mut [TransactionLoadResult],
rent_collector: &RentCollector,
last_blockhash_with_fee_calculator: &(Hash, FeeCalculator),
fix_recent_blockhashes_sysvar_delay: bool,
rent_fix_enabled: bool
)
Store the accounts into the DB
pub fn purge_slot(&self, slot: Slot)
[src]
Purge a slot if it is not a root Root slots cannot be purged
pub fn add_root(&self, slot: Slot)
[src]
Add a slot to root. Root slots cannot be purged
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Accounts
[src]
impl Send for Accounts
[src]
impl Sync for Accounts
[src]
impl Unpin for Accounts
[src]
impl !UnwindSafe for Accounts
[src]
Blanket Implementations
impl<T> AbiExample for T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,