pub struct BlockUndo {
pub n_tx_undo: usize,
/* private fields */
}Expand description
The undo data of a block is used internally during re-orgs. It holds the previous transaction outputs of a block’s transactions. This data may be useful for building indexes.
Fields§
§n_tx_undo: usizeImplementations§
Source§impl BlockUndo
impl BlockUndo
Sourcepub fn get_transaction_undo_size(&self, transaction_index: u64) -> u64
pub fn get_transaction_undo_size(&self, transaction_index: u64) -> u64
Gets the number of previous outputs associated with a transaction in a
Block by its index.
Sourcepub fn get_prevout_height_by_index(
&self,
transaction_index: u64,
prevout_index: u64,
) -> Result<u32, KernelError>
pub fn get_prevout_height_by_index( &self, transaction_index: u64, prevout_index: u64, ) -> Result<u32, KernelError>
Gets the previous output creation height by its index.
Sourcepub fn get_prevout_by_index(
&self,
transaction_index: u64,
prevout_index: u64,
) -> Result<TxOut, KernelError>
pub fn get_prevout_by_index( &self, transaction_index: u64, prevout_index: u64, ) -> Result<TxOut, KernelError>
Gets the previous output of a transaction by its index.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockUndo
impl RefUnwindSafe for BlockUndo
impl Unpin for BlockUndo
impl UnwindSafe for BlockUndo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more