Enum grin_core::core::transaction::KernelFeatures
source · pub enum KernelFeatures {
Plain {
fee: FeeFields,
},
Coinbase,
HeightLocked {
fee: FeeFields,
lock_height: u64,
},
NoRecentDuplicate {
fee: FeeFields,
relative_height: NRDRelativeHeight,
},
}
Expand description
Various tx kernel variants.
Variants§
Plain
Plain kernel (the default for Grin txs).
Coinbase
A coinbase kernel.
HeightLocked
A kernel with an explicit lock height (and fee).
Fields
NoRecentDuplicate
“No Recent Duplicate” (NRD) kernels enforcing relative lock height between instances.
Implementations§
source§impl KernelFeatures
impl KernelFeatures
sourcepub fn as_u8(&self) -> u8
pub fn as_u8(&self) -> u8
Underlying (u8) value representing this kernel variant. This is the first byte when we serialize/deserialize the kernel features.
sourcepub fn kernel_sig_msg(&self) -> Result<Message, Error>
pub fn kernel_sig_msg(&self) -> Result<Message, Error>
msg = hash(features) for coinbase kernels hash(features || fee_fields) for plain kernels hash(features || fee_fields || lock_height) for height locked kernels hash(features || fee_fields || relative_height) for NRD kernels
Trait Implementations§
source§impl Clone for KernelFeatures
impl Clone for KernelFeatures
source§fn clone(&self) -> KernelFeatures
fn clone(&self) -> KernelFeatures
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for KernelFeatures
impl Debug for KernelFeatures
source§impl<'de> Deserialize<'de> for KernelFeatures
impl<'de> Deserialize<'de> for KernelFeatures
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for KernelFeatures
impl PartialEq for KernelFeatures
source§fn eq(&self, other: &KernelFeatures) -> bool
fn eq(&self, other: &KernelFeatures) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Readable for KernelFeatures
impl Readable for KernelFeatures
source§impl Serialize for KernelFeatures
impl Serialize for KernelFeatures
source§impl Writeable for KernelFeatures
impl Writeable for KernelFeatures
impl Copy for KernelFeatures
impl StructuralPartialEq for KernelFeatures
Auto Trait Implementations§
impl Freeze for KernelFeatures
impl RefUnwindSafe for KernelFeatures
impl Send for KernelFeatures
impl Sync for KernelFeatures
impl Unpin for KernelFeatures
impl UnwindSafe for KernelFeatures
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