[][src]Struct ckb_jsonrpc_types::TransactionTemplate

pub struct TransactionTemplate {
    pub hash: H256,
    pub required: bool,
    pub cycles: Option<Cycle>,
    pub depends: Option<Vec<Uint64>>,
    pub data: Transaction,
}

Transaction template which is ready to be committed in the new block.

Fields

hash: H256

Transaction hash.

required: bool

Whether miner must include this transaction in the new block.

cycles: Option<Cycle>

The hint of how many cycles this transaction consumes.

Miners can utilize this field to ensure that the total cycles do not exceed the limit while selecting transactions.

depends: Option<Vec<Uint64>>

Transaction dependencies.

This is a hint to help miners selecting transactions.

This transaction can only be committed if its dependencies are also committed in the new block.

This field is a list of indices into the array transactions in the block template.

For example, depends = [1, 2] means this transaction depends on block_template.transactions[1] and block_template.transactions[2].

data: Transaction

The transaction.

Miners must keep it unchanged when including it in the new block.

Trait Implementations

impl Clone for TransactionTemplate[src]

impl Debug for TransactionTemplate[src]

impl Default for TransactionTemplate[src]

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

impl Eq for TransactionTemplate[src]

impl From<TransactionTemplate> for Transaction[src]

impl Hash for TransactionTemplate[src]

impl PartialEq<TransactionTemplate> for TransactionTemplate[src]

impl Serialize for TransactionTemplate[src]

impl StructuralEq for TransactionTemplate[src]

impl StructuralPartialEq for TransactionTemplate[src]

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> 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> 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.