[−][src]Struct grin_core::core::compact_block::CompactBlock
Compact representation of a full block. Each input/output/kernel is represented as a short_id. A node is reasonably likely to have already seen all tx data (tx broadcast before block) and can go request missing tx data from peers if necessary to hydrate a compact block into a full block.
Fields
header: BlockHeader
The header with metadata and commitments to the rest of the data
nonce: u64
Nonce for connection specific short_ids
Implementations
impl CompactBlock
[src]
pub fn kern_ids(&self) -> &Vec<ShortId>
[src]
Get kern_ids
pub fn kern_full(&self) -> &Vec<TxKernel>
[src]
Get full (coinbase) kernels
pub fn out_full(&self) -> &Vec<Output>
[src]
Get full (coinbase) outputs
Trait Implementations
impl Clone for CompactBlock
[src]
fn clone(&self) -> CompactBlock
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CompactBlock
[src]
impl DefaultHashable for CompactBlock
[src]
impl From<Block> for CompactBlock
[src]
impl From<UntrustedCompactBlock> for CompactBlock
[src]
fn from(ucb: UntrustedCompactBlock) -> Self
[src]
impl Into<CompactBlockBody> for CompactBlock
[src]
fn into(self) -> CompactBlockBody
[src]
impl Readable for CompactBlock
[src]
Implementation of Readable for a compact block, defines how to read a compact block from a binary stream.
impl Writeable for CompactBlock
[src]
Implementation of Writeable for a compact block, defines how to write the block to a binary writer. Differentiates between writing the block for the purpose of full serialization and the one of just extracting a hash.
Auto Trait Implementations
impl RefUnwindSafe for CompactBlock
impl Send for CompactBlock
impl Sync for CompactBlock
impl Unpin for CompactBlock
impl UnwindSafe for CompactBlock
Blanket Implementations
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Sync + Send> where
T: Send + Sync,
T: Send + Sync,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<D> Hashed for D where
D: DefaultHashable,
[src]
D: DefaultHashable,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> PMMRIndexHashable for T where
T: DefaultHashable,
[src]
T: DefaultHashable,
fn hash_with_index(&Self, u64) -> Hash
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<H> ShortIdentifiable for H where
H: Hashed,
[src]
H: Hashed,
fn short_id(&Self, &Hash, u64) -> ShortId
[src]
Generate a short_id via the following -
- extract k0/k1 from block_hash hashed with the nonce (first two u64
values) * initialize a siphasher24 with k0/k1
- self.hash() passing in the siphasher24 instance
- drop the 2 most significant bytes (to return a 6 byte short_id)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,