Skip to main content

DbReader

Struct DbReader 

Source
pub struct DbReader { /* private fields */ }

Implementations§

Source§

impl DbReader

Source

pub fn new( db: Arc<Db>, network: NetworkIdentifier, currency: u64, seed: GenerationHashSeed, mempool: Arc<SharedMempool>, recent: SharedRecent, partials: Arc<SharedPartialPool>, ) -> Self

Trait Implementations§

Source§

impl Reader for DbReader

Source§

fn accounts( &self, addresses: &[Address], at: Option<u64>, ) -> Result<Vec<AccountJson>, StateError>

アカウントの状態。addresses のうち、あるものだけを渡した順に。全部を同じ高さで読む
Source§

fn mosaics( &self, ids: &[u64], at: Option<u64>, ) -> Result<Vec<MosaicStateJson>, StateError>

モザイクの定義の状態。ids のうち、あるものだけを渡した順に。全部を同じ高さで読む
Source§

fn multisigs( &self, addresses: &[Address], at: Option<u64>, ) -> Result<Vec<MultisigJson>, StateError>

マルチシグの状態。addresses のうち、あるものだけを渡した順に。全部を同じ高さで読む
Source§

fn lock_or_restriction_states( &self, cache: SubCache, keys: &[Vec<u8>], at: Option<u64>, ) -> Result<KeyedStates, StateError>

ロックか制限(cache が SubCache::HashLockInfo、SubCache::SecretLockInfo、 SubCache::AccountRestriction、SubCache::MosaicRestriction)の状態を、catapult の状態のバイト列 (版の番号から)で。keys(木のキーのもと)のうち、あるものだけを、キーと組で渡した順に。全部を同じ高さで読む。 ロックは履歴の最後のもので、使ったものや期限を過ぎたものも、状態に残っていれば返す(catapult の REST と同じ)
Source§

fn multisig_graph( &self, address: &Address, at: Option<u64>, ) -> Result<Option<Vec<MultisigGraphLevel>>, StateError>

address から上と下にたどったマルチシグの木(multisig_graph)。address になければ None。 全部を同じ高さで読む
Source§

fn namespace( &self, id: u64, at: Option<u64>, ) -> Result<Option<NamespaceInfo>, StateError>

ネームスペース(ルートか子)の状態。なければ None。期限(猶予を含む)が過ぎても状態に残っていれば返し、 active が false になる(catapult の REST と同じ)
Source§

fn metadata( &self, composite_hash: &Hash256, at: Option<u64>, ) -> Result<Option<MetadataEntryJson>, StateError>

メタデータの状態。composite_hash は1件を指すハッシュ。なければ None
Source§

fn search_metadata( &self, filter: &MetadataFilter, page: PageRequest, after: Option<&MetadataPosition>, at: Option<u64>, ) -> Result<Option<Vec<MetadataEntryJson>>, StateError>

メタデータを filter で絞り、page の分を返す。after があれば、並びでその位置より後から。 at なら、その高さにあったものとその高さの値。 検索表を作っていなければ(at なら、昔の高さの分も作っていなければ)None
Source§

fn search_namespaces( &self, filter: &NamespaceFilter, page: PageRequest, after: Option<&[u8]>, at: Option<u64>, ) -> Result<Option<Vec<(String, NamespaceInfo)>>, StateError>

ネームスペースを filter で絞り、page の分を、位置(検索表のキーの16進)と組で返す。after があれば、 並びでその位置(前に返した位置のバイト列)より後から。at なら、その高さにあったものとその高さの状態。 検索表を作っていなければ(at なら、昔の高さの分も作っていなければ)None
Source§

fn namespace_names( &self, ids: &[u64], ) -> Result<Option<Vec<NamespaceNameJson>>, String>

ネームスペースの名前(自分の部分)と親の ID(ルートは None)。ids と、その親を全部。登録を見ていないものは 返さない。名前の表を作っていなければ None
Source§

fn alias_names( &self, target: AliasTarget, ) -> Result<Option<Vec<String>>, String>

target を別名にしている、今有効なネームスペースの名前(ルートからつないだもの)。名前の表を作っていなければ None
Source§

fn state_path( &self, cache: SubCache, key: &Hash256, at: Option<u64>, ) -> Result<MerkleStateInfo, StateError>

状態の木 cache の、根から key の葉への道。ないことを示す道もある
Source§

fn block(&self, height: u64) -> Result<Option<BlockInfo>, String>

height のブロック。なければ(まだないか、刈り込んだか、その高さの根がもうなければ)None
Source§

fn transaction_status( &self, hash: &Hash256, ) -> Result<Option<TransactionStatus>, String>

トランザクションの行方。知らなければ None
Source§

fn search_transactions( &self, filter: &TransactionFilter, page: PageRequest, after: Option<(u64, u32, u16)>, ) -> Result<Option<Vec<TransactionInfo>>, String>

承認されたトランザクションを filter で絞り、page の分を返す。after があれば、並び(高さとブロックの中の 番号の順)でその位置より後から。アドレス、署名者、宛先で絞るのに要る索引(storage.search の Transactions)を作っていなければ None。それらで絞らなければ、索引がなくてもしまってあるブロックを順に読む
Source§

fn confirmed_transaction( &self, hash: &Hash256, ) -> Result<Option<TransactionInfo>, String>

承認されたトランザクション。知らなければ None
Source§

fn transaction_merkle( &self, height: u64, hash: &Hash256, ) -> Result<Option<MerkleProofInfo>, String>

高さ height のブロックの TransactionsHash への、hash のトランザクションの経路。なければ None
Source§

fn transaction_fees(&self) -> Result<TransactionFeesJson, String>

直近のブロックの手数料の倍率と、ノードが受け付ける下限
Source§

fn partial_transaction( &self, hash: &Hash256, ) -> Result<Option<TransactionInfo>, String>

連署を待つアグリゲートボンデッド(集まった連署付き)。知らなければ None
Source§

fn partial_transactions( &self, filter: &PartialFilter, ) -> Result<Vec<TransactionInfo>, String>

連署を待つものの一覧。filter に合うものを、期限の早い順に
Source§

fn finalization_proof(&self, epoch: u32) -> Result<Option<Vec<u8>>, String>

エポック epoch でしまった最後のファイナライズの証明(ノードが送り合うバイナリの形)。なければ None
Source§

fn unconfirmed_transaction( &self, hash: &Hash256, ) -> Result<Option<TransactionInfo>, String>

未承認のもの。知らなければ None
Source§

fn unconfirmed_transactions( &self, filter: &PartialFilter, embedded: bool, ) -> Result<Vec<TransactionInfo>, String>

未承認のものの一覧。filter に合うものを、受け付けた順に。embedded なら、アグリゲートのすぐあとに、中のものを 1件ずつ続ける(catapult と同じく、address で絞るときは中のものは返さない)
Source§

fn network(&self) -> NetworkIdentifier

公開鍵からアドレスを出すときのネットワーク

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.