|
| | State (u256 const &_accountStartNonce) |
| | Default constructor; creates with a blank database prepopulated with the genesis block. More...
|
| |
| | State (u256 const &_accountStartNonce, OverlayDB const &_db, BaseState _bs=BaseState::PreExisting) |
| |
| | State (NullType) |
| |
| | State (State const &_s) |
| | Copy state object. More...
|
| |
| State & | operator= (State const &_s) |
| | Copy state object. More...
|
| |
| OverlayDB const & | db () const |
| |
| OverlayDB & | db () |
| |
| void | populateFrom (AccountMap const &_map) |
| | Populate the state from the given AccountMap. Just uses dev::eth::commit(). More...
|
| |
| std::unordered_map< Address, u256 > | addresses () const |
| |
| std::pair< AddressMap, h256 > | addresses (h256 const &_begin, size_t _maxResults) const |
| |
| std::pair< ExecutionResult, TransactionReceipt > | execute (EnvInfo const &_envInfo, SealEngineFace const &_sealEngine, Transaction const &_t, Permanence _p=Permanence::Committed, OnOpFunc const &_onOp=OnOpFunc()) |
| |
| void | executeBlockTransactions (Block const &_block, unsigned _txCount, LastBlockHashesFace const &_lastHashes, SealEngineFace const &_sealEngine) |
| |
| bool | addressInUse (Address const &_address) const |
| | Check if the address is in use. More...
|
| |
| bool | accountNonemptyAndExisting (Address const &_address) const |
| |
| bool | addressHasCode (Address const &_address) const |
| | Check if the address contains executable code. More...
|
| |
| u256 | balance (Address const &_id) const |
| |
| void | addBalance (Address const &_id, u256 const &_amount) |
| |
| void | subBalance (Address const &_addr, u256 const &_value) |
| |
| void | setBalance (Address const &_addr, u256 const &_value) |
| |
| void | transferBalance (Address const &_from, Address const &_to, u256 const &_value) |
| | Transfers "the balance _value between two accounts. 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 |
| |
| void | setStorage (Address const &_contract, u256 const &_location, u256 const &_value) |
| | Set the value of a storage position of an account. More...
|
| |
| u256 | originalStorageValue (Address const &_contract, u256 const &_key) const |
| |
| void | clearStorage (Address const &_contract) |
| | Clear the storage root hash of an account to the hash of the empty trie. More...
|
| |
| void | createContract (Address const &_address) |
| | Create a contract at the given address (with unset code and unchanged balance). More...
|
| |
| void | setCode (Address const &_address, bytes &&_code) |
| | Sets the code of the account. Must only be called during / after contract creation. More...
|
| |
| void | kill (Address _a) |
| | Delete an account (used for processing suicides). More...
|
| |
| std::map< h256, std::pair< u256, u256 > > | storage (Address const &_contract) const |
| |
| bytes const & | code (Address const &_addr) const |
| |
| h256 | codeHash (Address const &_contract) const |
| |
| size_t | codeSize (Address const &_contract) const |
| |
| void | incNonce (Address const &_id) |
| | Increament the account nonce. More...
|
| |
| void | setNonce (Address const &_addr, u256 const &_newNonce) |
| | Set the account nonce. More...
|
| |
| u256 | getNonce (Address const &_addr) const |
| |
| h256 | rootHash () const |
| | The hash of the root of our state tree. More...
|
| |
| void | commit (CommitBehaviour _commitBehaviour) |
| |
| void | setRoot (h256 const &_root) |
| | Resets any uncommitted changes to the cache. More...
|
| |
| u256 const & | accountStartNonce () const |
| | Get the account start nonce. May be required. More...
|
| |
| u256 const & | requireAccountStartNonce () const |
| |
| void | noteAccountStartNonce (u256 const &_actual) |
| |
| size_t | savepoint () const |
| |
| void | rollback (size_t _savepoint) |
| | Revert all recent changes up to the given _savepoint savepoint. More...
|
| |
| ChangeLog const & | changeLog () const |
| |
Model of an Ethereum state, essentially a facade for the trie.
Allows you to query the state of accounts as well as creating and modifying accounts. It has built-in caching for various aspects of the state.
State Changelog
Any atomic change to any account is registered and appended in the changelog. In case some changes must be reverted, the changes are popped from the changelog and undone. For possible atomic changes list
- See also
- Change::Kind. The changelog is managed by savepoint(), rollback() and commit() methods.
Definition at line 159 of file State.h.