Struct ckb_jsonrpc_types::TransactionTemplate
source · 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: H256Transaction hash.
required: boolWhether 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: TransactionThe transaction.
Miners must keep it unchanged when including it in the new block.
Trait Implementations§
source§impl Clone for TransactionTemplate
impl Clone for TransactionTemplate
source§fn clone(&self) -> TransactionTemplate
fn clone(&self) -> TransactionTemplate
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TransactionTemplate
impl Debug for TransactionTemplate
source§impl Default for TransactionTemplate
impl Default for TransactionTemplate
source§fn default() -> TransactionTemplate
fn default() -> TransactionTemplate
source§impl<'de> Deserialize<'de> for TransactionTemplate
impl<'de> Deserialize<'de> for TransactionTemplate
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>,
source§impl From<TransactionTemplate> for Transaction
impl From<TransactionTemplate> for Transaction
source§fn from(template: TransactionTemplate) -> Self
fn from(template: TransactionTemplate) -> Self
source§impl Hash for TransactionTemplate
impl Hash for TransactionTemplate
source§impl PartialEq<TransactionTemplate> for TransactionTemplate
impl PartialEq<TransactionTemplate> for TransactionTemplate
source§fn eq(&self, other: &TransactionTemplate) -> bool
fn eq(&self, other: &TransactionTemplate) -> bool
self and other values to be equal, and is used
by ==.