 |
Ethereum
PoC-8
The C++ Implementation of Ethereum
|
Go to the documentation of this file.
47 static const h256 PendingChangedFilter =
u256(0);
48 static const h256 ChainChangedFilter =
u256(1);
59 #if INITIAL_STATE_AS_CHANGES
64 mutable std::chrono::system_clock::time_point
lastPoll = std::chrono::system_clock::now();
124 unsigned number()
const override;
148 BOOST_THROW_EXCEPTION(
153 BOOST_THROW_EXCEPTION(
158 BOOST_THROW_EXCEPTION(
164 BOOST_THROW_EXCEPTION(
186 std::unordered_map<h256, h256s>
m_specialFilters = std::unordered_map<h256, std::vector<h256>>{{PendingChangedFilter, {}}, {ChainChangedFilter, {}}};
LocalisedTransaction localisedTransaction(h256 const &_transactionHash) const override
SyncStatus syncStatus() const override
Get some information on the block queue.
virtual BlockChain & bc()=0
virtual BlockChain const & bc() const =0
bool uninstallWatch(unsigned _watchId) override
h256 codeHashAt(Address _a, BlockNumber _block) const override
std::map< unsigned, ClientWatch > m_watches
Each and every watch - these reference a filter.
void startSealing() override
u256 gasLimitRemaining() const override
Get the remaining gas limit in this block.
Encodes a transaction, ready to be exported to or freshly imported from RLP.
u256 stateAt(Address _a, u256 _l) const
u256 countAt(Address _a) const
bytes codeAt(Address _a, BlockNumber _block) const override
LocalisedLogEntries logs(unsigned _watchId) const override
BlockDetails blockDetails(h256 _hash) const override
std::vector< Transaction > Transactions
Nice name for vector of Transaction.
std::chrono::system_clock::time_point lastPoll
virtual void prepareForTransaction()=0
BlockNumber numberFromHash(h256 _blockHash) const override
std::pair< h256, unsigned > transactionLocation(h256 const &_transactionHash) const override
virtual SealEngineFace * sealEngine() const
Get the seal engine.
InstalledFilter(LogFilter const &_f)
virtual Block postSeal() const =0
Transactions transactions(h256 _blockHash) const override
LocalisedLogEntries changes
bytes codeAt(Address _a) const
int compareBlockHashes(h256 _h1, h256 _h2) const override
unsigned transactionCount(h256 _blockHash) const override
BlockHeader pendingInfo() const override
BlockHeader blockInfo(h256 _hash) const override
u256 countAt(Address _a, BlockNumber _block) const override
virtual Block preSeal() const =0
h160s Addresses
A vector of Ethereum addresses.
std::map< h256, std::pair< u256, u256 > > storageAt(Address _a, BlockNumber _block) const override
u256 stateAt(Address _a, u256 _l, BlockNumber _block) const override
Transactions transactions(BlockNumber _block) const override
u256 balanceAt(Address _a) const
LocalisedTransactionReceipt localisedTransactionReceipt(h256 const &_transactionHash) const override
u256 gasBidPrice() const override
u256 balanceAt(Address _a, BlockNumber _block) const override
void stopSealing() override
BlockDetails pendingDetails() const override
std::vector< h256 > h256s
bool wouldSeal() const override
Would we like to be sealing now?
boost::log::sources::severity_channel_logger<> Logger
std::pair< u256, ExecutionResult > estimateGas(Address const &_from, u256 _value, Address _dest, bytes const &_data, int64_t _maxGas, u256 _gasPrice, BlockNumber _blockNumber, GasEstimationCallback const &_callback) override
bool isKnown(h256 const &_hash) const override
EVMSchedule evmSchedule() const override
TransactionReceipt transactionReceipt(h256 const &_transactionHash) const override
ImportResult injectBlock(bytes const &_block) override
Injects the RLP-encoded block given by the _rlp into the block queue directly.
std::vector< byte > bytes
Logger createLogger(int _severity, std::string const &_channel)
UncleHashes uncleHashes(h256 _blockHash) const override
Transactions const & pending() const
Get the list of pending transactions.
std::function< void(GasEstimationProgress const &)> GasEstimationCallback
Implements the blockchain database. All data this gives is disk-backed. @threadsafe.
Main API hub for interfacing with Ethereum.
std::unordered_map< h256, h256s > m_specialFilters
The dictionary of special filters and their additional data.
h256s pendingHashes() const override
int chainId() const override
Gets the chain id.
std::vector< LocalisedLogEntry > LocalisedLogEntries
std::map< h256, std::pair< u256, u256 > > storageAt(Address _a) const
LocalisedLogEntries changes
h256 hashFromNumber(BlockNumber _number) const override
bool isKnownTransaction(h256 const &_transactionHash) const override
unsigned uncleCount(h256 _blockHash) const override
unsigned number() const override
ClientWatch(h256 _id, Reaping _r)
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void > > u256
virtual Addresses addresses() const
Block blockByNumber(BlockNumber _h) const
virtual void prependLogsFromBlock(LogFilter const &_filter, h256 const &_blockHash, BlockPolarity _polarity, LocalisedLogEntries &io_logs) const
unsigned installWatch(LogFilter const &_filter, Reaping _r=Reaping::Automatic) override
Install, uninstall and query watches.
unsigned transactionCount(BlockNumber _block) const override
TransactionHashes transactionHashes(h256 _blockHash) const override
LocalisedLogEntries checkWatch(unsigned _watchId) override
h256 codeHashAt(Address _a) const
std::unordered_map< h256, InstalledFilter > m_filters
The dictionary of filters that are active.
h256 stateRootAt(Address _a, BlockNumber _block) const override
virtual Block block(h256 const &_h) const =0
virtual EVMSchedule const & evmSchedule(u256 const &_blockNumber) const =0
boost::error_info< struct tag_interface, std::string > errinfo_interface
Address author() const override
Get the block author.
Transaction transaction(h256 _transactionHash) const override
Active model of a block within the block chain. Keeps track of all transactions, receipts and state f...
LocalisedLogEntries peekWatch(unsigned _watchId) const override
BlockHeader uncle(h256 _blockHash, unsigned _i) const override