Struct ethcore::block::OpenBlock
[−]
[src]
pub struct OpenBlock<'x> { /* fields omitted */ }
Block that is ready for transactions to be added.
It's a bit like a Vecstate()
. We also archive execution receipts in preparation for later block creation.
Methods
impl<'x> OpenBlock<'x>
[src]
impl<'x> OpenBlock<'x>
pub fn new<'a>(
engine: &'x EthEngine,
factories: Factories,
tracing: bool,
db: StateDB,
parent: &Header,
last_hashes: Arc<LastHashes>,
author: Address,
gas_range_target: (U256, U256),
extra_data: Bytes,
is_epoch_begin: bool,
ancestry: &mut Iterator<Item = ExtendedHeader>
) -> Result<Self, Error>
[src]
pub fn new<'a>(
engine: &'x EthEngine,
factories: Factories,
tracing: bool,
db: StateDB,
parent: &Header,
last_hashes: Arc<LastHashes>,
author: Address,
gas_range_target: (U256, U256),
extra_data: Bytes,
is_epoch_begin: bool,
ancestry: &mut Iterator<Item = ExtendedHeader>
) -> Result<Self, Error>
Create a new OpenBlock
ready for transaction pushing.
pub fn set_timestamp(&mut self, timestamp: u64)
[src]
pub fn set_timestamp(&mut self, timestamp: u64)
Alter the timestamp of the block.
pub fn remove_gas_limit(&mut self)
[src]
pub fn remove_gas_limit(&mut self)
Removes block gas limit.
pub fn push_uncle(
&mut self,
valid_uncle_header: Header
) -> Result<(), BlockError>
[src]
pub fn push_uncle(
&mut self,
valid_uncle_header: Header
) -> Result<(), BlockError>
Add an uncle to the block, if possible.
NOTE Will check chain constraints and the uncle number but will NOT check that the header itself is actually valid.
pub fn env_info(&self) -> EnvInfo
[src]
pub fn env_info(&self) -> EnvInfo
Get the environment info concerning this block.
pub fn push_transaction(
&mut self,
t: SignedTransaction,
h: Option<H256>
) -> Result<&Receipt, Error>
[src]
pub fn push_transaction(
&mut self,
t: SignedTransaction,
h: Option<H256>
) -> Result<&Receipt, Error>
Push a transaction into the block.
If valid, it will be executed, and archived together with the receipt.
pub fn close(self) -> ClosedBlock
[src]
pub fn close(self) -> ClosedBlock
Turn this into a ClosedBlock
.
pub fn close_and_lock(self) -> LockedBlock
[src]
pub fn close_and_lock(self) -> LockedBlock
Turn this into a LockedBlock
.
Trait Implementations
impl<'x> IsBlock for OpenBlock<'x>
[src]
impl<'x> IsBlock for OpenBlock<'x>
fn block(&self) -> &ExecutedBlock
[src]
fn block(&self) -> &ExecutedBlock
Get the ExecutedBlock
associated with this object.
fn to_base(&self) -> Block
[src]
fn to_base(&self) -> Block
Get the base Block
object associated with this.
fn header(&self) -> &Header
[src]
fn header(&self) -> &Header
Get the header associated with this object's block.
fn state(&self) -> &State<StateDB>
[src]
fn state(&self) -> &State<StateDB>
Get the final state associated with this object's block.
fn transactions(&self) -> &[SignedTransaction]
[src]
fn transactions(&self) -> &[SignedTransaction]
Get all information on transactions in this block.
fn receipts(&self) -> &[Receipt]
[src]
fn receipts(&self) -> &[Receipt]
Get all information on receipts in this block.
fn traces(&self) -> &Tracing
[src]
fn traces(&self) -> &Tracing
Get all information concerning transaction tracing in this block.
fn uncles(&self) -> &[Header]
[src]
fn uncles(&self) -> &[Header]
Get all uncles in this block.
fn tracing_enabled(&self) -> bool
[src]
fn tracing_enabled(&self) -> bool
Get tracing enabled flag for this block.