Struct bitcoin_indexed_chain::TxIndex
source · pub struct TxIndex { /* private fields */ }
Expand description
| TxIndex is used to look up transactions | included in the blockchain by hash. | | The index is written to a LevelDB database | and records the filesystem location | of each transaction by transaction | hash. |
Implementations§
source§impl TxIndex
impl TxIndex
pub fn get_name(&self) -> *const u8
sourcepub fn new(
n_cache_size: usize,
memory: Option<bool>,
wipe: Option<bool>
) -> Self
pub fn new( n_cache_size: usize, memory: Option<bool>, wipe: Option<bool> ) -> Self
| Constructs the index, which becomes | available to be queried. |
pub fn write_block(&mut self, block: &Block, pindex: *const BlockIndex) -> bool
pub fn getdb(&self) -> &mut BaseIndexDB
sourcepub fn find_tx(
&self,
tx_hash: &u256,
block_hash: &mut u256,
tx: &mut TransactionRef
) -> bool
pub fn find_tx( &self, tx_hash: &u256, block_hash: &mut u256, tx: &mut TransactionRef ) -> bool
| Look up a transaction by hash. | | ———– | @param[in] tx_hash | | The hash of the transaction to be returned. | ––––– | @param[out] block_hash | | The hash of the block the transaction | is found in. | ––––– | @param[out] tx | | The transaction itself. | | ———– | @return | | true if transaction is found, false | otherwise |
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TxIndex
impl !Send for TxIndex
impl !Sync for TxIndex
impl Unpin for TxIndex
impl !UnwindSafe for TxIndex
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more