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 the “default value” for a type. Read more
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
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for TransactionTemplate
impl Send for TransactionTemplate
impl Sync for TransactionTemplate
impl Unpin for TransactionTemplate
impl UnwindSafe for TransactionTemplate
Blanket Implementations
Mutably borrows from an owned value. Read more