|
| Block (u256 const &_accountStartNonce) |
| Default constructor; creates with a blank database prepopulated with the genesis block. More...
|
|
| Block (BlockChain const &_bc, OverlayDB const &_db, BaseState _bs=BaseState::PreExisting, Address const &_author=Address()) |
| Basic state object from database. More...
|
|
| Block (BlockChain const &_bc, OverlayDB const &_db, h256 const &_root, Address const &_author=Address()) |
| Basic state object from database. More...
|
|
| Block (NullType) |
|
| Block (BlockChain const &_bc) |
| Construct from a given blockchain. Empty, but associated with _bc 's chain params. More...
|
|
| Block (Block const &_s) |
| Copy state object. More...
|
|
Block & | operator= (Block const &_s) |
| Copy state object. More...
|
|
Address | author () const |
| Get the author address for any transactions we do and rewards we get. More...
|
|
void | setAuthor (Address const &_id) |
| Set the author address for any transactions we do and rewards we get. More...
|
|
void | noteChain (BlockChain const &_bc) |
| Note the fact that this block is being used with a particular chain. More...
|
|
u256 | balance (Address const &_address) const |
| Get an account's balance. More...
|
|
u256 | transactionsFrom (Address const &_address) const |
| Get the number of transactions a particular address has sent (used for the transaction nonce). More...
|
|
bool | addressInUse (Address const &_address) const |
| Check if the address is in use. More...
|
|
bool | addressHasCode (Address const &_address) const |
| Check if the address contains executable code. More...
|
|
h256 | storageRoot (Address const &_contract) const |
| Get the root of the storage of an account. More...
|
|
u256 | storage (Address const &_contract, u256 const &_memory) const |
| Get the value of a storage position of an account. More...
|
|
std::map< h256, std::pair< u256, u256 > > | storage (Address const &_contract) const |
| Get the storage of an account. More...
|
|
bytes const & | code (Address const &_contract) const |
| Get the code of an account. More...
|
|
h256 | codeHash (Address const &_contract) const |
| Get the code hash of an account. More...
|
|
State const & | state () const |
| Get the backing state object. More...
|
|
OverlayDB const & | db () const |
| Open a DB - useful for passing into the constructor & keeping for other states that are necessary. More...
|
|
h256 | rootHash () const |
| The hash of the root of our state tree. More...
|
|
std::unordered_map< Address, u256 > | addresses () const |
|
State & | mutableState () |
| Get a mutable State object which is backing this block. More...
|
|
u256 | gasLimitRemaining () const |
| Get the remaining gas limit in this block. More...
|
|
Transactions const & | pending () const |
| Get the list of pending transactions. More...
|
|
h256Hash const & | pendingHashes () const |
| Get the list of hashes of pending transactions. More...
|
|
TransactionReceipt const & | receipt (unsigned _i) const |
| Get the transaction receipt for the transaction of the given index. More...
|
|
LogEntries const & | log (unsigned _i) const |
| Get the list of pending transactions. More...
|
|
LogBloom | logBloom () const |
| Get the bloom filter of all logs that happened in the block. More...
|
|
LogBloom const & | logBloom (unsigned _i) const |
| Get the bloom filter of a particular transaction that happened in the block. More...
|
|
State | fromPending (unsigned _i) const |
| Get the State immediately after the given number of pending transactions have been applied. More...
|
|
PopulationStatistics | populateFromChain (BlockChain const &_bc, h256 const &_hash, ImportRequirements::value _ir=ImportRequirements::None) |
| Construct state object from arbitrary point in blockchain. More...
|
|
ExecutionResult | execute (LastHashes const &_lh, Transaction const &_t, Permanence _p=Permanence::Committed, OnOpFunc const &_onOp=OnOpFunc()) |
| Execute a given transaction. More...
|
|
std::pair< TransactionReceipts, bool > | sync (BlockChain const &_bc, TransactionQueue &_tq, GasPricer const &_gp, unsigned _msTimeout=100) |
| Sync our transactions, killing those from the queue that we have and assimilating those that we don't. More...
|
|
bool | sync (BlockChain const &_bc) |
| Sync our state with the block chain. More...
|
|
bool | sync (BlockChain const &_bc, h256 const &_blockHash, BlockHeader const &_bi=BlockHeader()) |
| Sync with the block chain, but rather than synching to the latest block, instead sync to the given block. More...
|
|
u256 | enactOn (VerifiedBlockRef const &_block, BlockChain const &_bc) |
| Execute all transactions within a given block. More...
|
|
void | cleanup (bool _fullCommit) |
| Returns back to a pristine state after having done a playback. More...
|
|
void | resetCurrent (u256 const &_timestamp=u256(utcTime())) |
| Sets m_currentBlock to a clean state, (i.e. More...
|
|
void | commitToSeal (BlockChain const &_bc, bytes const &_extraData={}) |
| Prepares the current state for mining. More...
|
|
bool | sealBlock (bytes const &_header) |
| Pass in a properly sealed header matching this block. More...
|
|
bool | sealBlock (bytesConstRef _header) |
|
bool | isSealed () const |
|
bytes const & | blockData () const |
| Get the complete current block, including valid nonce. More...
|
|
BlockHeader const & | info () const |
| Get the header information on the present block. More...
|
|
|
SealEngineFace * | sealEngine () const |
|
void | uncommitToSeal () |
| Undo the changes to the state for committing to mine. More...
|
|
void | ensureCached (Address const &_a, bool _requireCode, bool _forceCreate) const |
| Retrieve all information about a given address into the cache. More...
|
|
void | ensureCached (std::unordered_map< Address, Account > &_cache, Address const &_a, bool _requireCode, bool _forceCreate) const |
| Retrieve all information about a given address into a cache. More...
|
|
u256 | enact (VerifiedBlockRef const &_block, BlockChain const &_bc) |
| Execute the given block, assuming it corresponds to m_currentBlock. More...
|
|
void | applyRewards (std::vector< BlockHeader > const &_uncleBlockHeaders, u256 const &_blockReward) |
| Finalise the block, applying the earned rewards. More...
|
|
u256 | gasUsed () const |
|
void | performIrregularModifications () |
| Performs irregular modifications right after initialization, e.g. to implement a hard fork. More...
|
|
std::string | vmTrace (bytesConstRef _block, BlockChain const &_bc, ImportRequirements::value _ir) |
| Provide a standard VM trace for debugging purposes. More...
|
|
Active model of a block within the block chain.
Keeps track of all transactions, receipts and state for a particular block. Can apply all needed transforms of the state for rewards and contains logic for sealing the block.
Definition at line 73 of file Block.h.