[][src]Enum grin_core::core::transaction::KernelFeatures

pub enum KernelFeatures {
    Plain {
        fee: u64,
    },
    Coinbase,
    HeightLocked {
        fee: u64,
        lock_height: u64,
    },
    NoRecentDuplicate {
        fee: u64,
        relative_height: NRDRelativeHeight,
    },
}

Various tx kernel variants.

Variants

Plain

Plain kernel (the default for Grin txs).

Fields of Plain

fee: u64

Plain kernels have fees.

Coinbase

A coinbase kernel.

HeightLocked

A kernel with an explicit lock height (and fee).

Fields of HeightLocked

fee: u64

Height locked kernels have fees.

lock_height: u64

Height locked kernels have lock heights.

NoRecentDuplicate

"No Recent Duplicate" (NRD) kernels enforcing relative lock height between instances.

Fields of NoRecentDuplicate

fee: u64

These have fees.

relative_height: NRDRelativeHeight

Relative lock height.

Implementations

impl KernelFeatures[src]

pub fn as_u8(&self) -> u8[src]

Underlying (u8) value representing this kernel variant. This is the first byte when we serialize/deserialize the kernel features.

pub fn as_string(&self) -> String[src]

Conversion for backward compatibility.

pub fn kernel_sig_msg(&self) -> Result<Message, Error>[src]

msg = hash(features) for coinbase kernels hash(features || fee) for plain kernels hash(features || fee || lock_height) for height locked kernels hash(features || fee || relative_height) for NRD kernels

impl KernelFeatures[src]

pub fn is_coinbase(&self) -> bool[src]

Is this a coinbase kernel?

pub fn is_plain(&self) -> bool[src]

Is this a plain kernel?

pub fn is_height_locked(&self) -> bool[src]

Is this a height locked kernel?

pub fn is_nrd(&self) -> bool[src]

Is this an NRD kernel?

Trait Implementations

impl Clone for KernelFeatures[src]

impl Copy for KernelFeatures[src]

impl Debug for KernelFeatures[src]

impl<'de> Deserialize<'de> for KernelFeatures[src]

impl PartialEq<KernelFeatures> for KernelFeatures[src]

impl Readable for KernelFeatures[src]

impl Serialize for KernelFeatures[src]

impl StructuralPartialEq for KernelFeatures[src]

impl Writeable for KernelFeatures[src]

fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>[src]

Protocol version may increment rapidly for other unrelated changes. So we match on ranges here and not specific version values.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any