Struct ckb_jsonrpc_types::TransactionTemplate[][src]

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.