Fabcoin Core
0.16.2
P2P Digital Currency
|
#include <ClientBase.h>
Public Member Functions | |
ClientBase (TransactionQueue::Limits const &_l=TransactionQueue::Limits{1024, 1024}) | |
virtual | ~ClientBase () |
virtual std::pair< h256, Address > | submitTransaction (TransactionSkeleton const &_t, Secret const &_secret) override |
Submits the given transaction. More... | |
virtual ExecutionResult | call (Address const &_secret, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict) override |
Makes the given call. Nothing is recorded into the state. More... | |
virtual ExecutionResult | create (Address const &_secret, u256 _value, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict) override |
Makes the given create. Nothing is recorded into the state. More... | |
virtual 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 |
Estimate gas usage for call/create. More... | |
virtual u256 | balanceAt (Address _a, BlockNumber _block) const override |
virtual u256 | countAt (Address _a, BlockNumber _block) const override |
virtual u256 | stateAt (Address _a, u256 _l, BlockNumber _block) const override |
virtual h256 | stateRootAt (Address _a, BlockNumber _block) const override |
virtual bytes | codeAt (Address _a, BlockNumber _block) const override |
virtual h256 | codeHashAt (Address _a, BlockNumber _block) const override |
virtual std::map< h256, std::pair< u256, u256 > > | storageAt (Address _a, BlockNumber _block) const override |
virtual LocalisedLogEntries | logs (unsigned _watchId) const override |
virtual LocalisedLogEntries | logs (LogFilter const &_filter) const override |
virtual void | prependLogsFromBlock (LogFilter const &_filter, h256 const &_blockHash, BlockPolarity _polarity, LocalisedLogEntries &io_logs) const |
virtual unsigned | installWatch (LogFilter const &_filter, Reaping _r=Reaping::Automatic) override |
Install, uninstall and query watches. More... | |
virtual unsigned | installWatch (h256 _filterId, Reaping _r=Reaping::Automatic) override |
virtual bool | uninstallWatch (unsigned _watchId) override |
virtual LocalisedLogEntries | peekWatch (unsigned _watchId) const override |
virtual LocalisedLogEntries | checkWatch (unsigned _watchId) override |
virtual h256 | hashFromNumber (BlockNumber _number) const override |
virtual BlockNumber | numberFromHash (h256 _blockHash) const override |
virtual int | compareBlockHashes (h256 _h1, h256 _h2) const override |
virtual BlockHeader | blockInfo (h256 _hash) const override |
virtual BlockDetails | blockDetails (h256 _hash) const override |
virtual Transaction | transaction (h256 _transactionHash) const override |
virtual LocalisedTransaction | localisedTransaction (h256 const &_transactionHash) const override |
virtual Transaction | transaction (h256 _blockHash, unsigned _i) const override |
virtual LocalisedTransaction | localisedTransaction (h256 const &_blockHash, unsigned _i) const override |
virtual TransactionReceipt | transactionReceipt (h256 const &_transactionHash) const override |
virtual LocalisedTransactionReceipt | localisedTransactionReceipt (h256 const &_transactionHash) const override |
virtual std::pair< h256, unsigned > | transactionLocation (h256 const &_transactionHash) const override |
virtual Transactions | transactions (h256 _blockHash) const override |
virtual TransactionHashes | transactionHashes (h256 _blockHash) const override |
virtual BlockHeader | uncle (h256 _blockHash, unsigned _i) const override |
virtual UncleHashes | uncleHashes (h256 _blockHash) const override |
virtual unsigned | transactionCount (h256 _blockHash) const override |
virtual unsigned | uncleCount (h256 _blockHash) const override |
virtual unsigned | number () const override |
virtual Transactions | pending () const override |
Get a map containing each of the pending transactions. More... | |
virtual h256s | pendingHashes () const override |
virtual BlockHeader | pendingInfo () const override |
virtual BlockDetails | pendingDetails () const override |
virtual EVMSchedule | evmSchedule () const override |
virtual ImportResult | injectTransaction (bytes const &_rlp, IfDropped _id=IfDropped::Ignore) override |
Injects the RLP-encoded transaction given by the _rlp into the transaction queue directly. More... | |
virtual ImportResult | injectBlock (bytes const &_block) override |
Injects the RLP-encoded block given by the _rlp into the block queue directly. More... | |
virtual Addresses | addresses (BlockNumber _block) const override |
virtual u256 | gasLimitRemaining () const override |
Get the remaining gas limit in this block. More... | |
virtual u256 | gasBidPrice () const override |
virtual Address | author () const override |
Get the block author. More... | |
virtual bool | isKnown (h256 const &_hash) const override |
virtual bool | isKnown (BlockNumber _block) const override |
virtual bool | isKnownTransaction (h256 const &_transactionHash) const override |
virtual bool | isKnownTransaction (h256 const &_blockHash, unsigned _i) const override |
virtual void | startSealing () override |
Start sealing. More... | |
virtual void | stopSealing () override |
Stop sealing. More... | |
virtual bool | wouldSeal () const override |
Would we like to be sealing now? More... | |
virtual SyncStatus | syncStatus () const override |
Get some information on the block queue. More... | |
Block | block (BlockNumber _h) const |
Public Member Functions inherited from dev::eth::Interface | |
Interface () | |
Constructor. More... | |
virtual | ~Interface () |
Destructor. More... | |
void | submitTransaction (Secret const &_secret, u256 const &_value, Address const &_dest, bytes const &_data=bytes(), u256 const &_gas=1000000, u256 const &_gasPrice=DefaultGasPrice, u256 const &_nonce=Invalid256) |
Submits the given message-call transaction. More... | |
Address | submitTransaction (Secret const &_secret, u256 const &_endowment, bytes const &_init, u256 const &_gas=1000000, u256 const &_gasPrice=DefaultGasPrice, u256 const &_nonce=Invalid256) |
Submits a new contract-creation transaction. More... | |
virtual void | flushTransactions ()=0 |
Blocks until all pending transactions have been processed. More... | |
ExecutionResult | call (Address const &_from, u256 _value, Address _dest, bytes const &_data=bytes(), u256 _gas=1000000, u256 _gasPrice=DefaultGasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
ExecutionResult | call (Secret const &_secret, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict) |
ExecutionResult | call (Secret const &_secret, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
ExecutionResult | create (Address const &_from, u256 _value, bytes const &_data=bytes(), u256 _gas=1000000, u256 _gasPrice=DefaultGasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
ExecutionResult | create (Secret const &_secret, u256 _value, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict) |
ExecutionResult | create (Secret const &_secret, u256 _value, bytes const &_data, u256 _gas, u256 _gasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
int | getDefault () const |
void | setDefault (BlockNumber _block) |
u256 | balanceAt (Address _a) const |
u256 | countAt (Address _a) const |
u256 | stateAt (Address _a, u256 _l) const |
bytes | codeAt (Address _a) const |
h256 | codeHashAt (Address _a) const |
std::map< h256, std::pair< u256, u256 > > | storageAt (Address _a) const |
LocalisedLogEntries | peekWatchSafe (unsigned _watchId) const |
LocalisedLogEntries | checkWatchSafe (unsigned _watchId) |
BlockHeader | blockInfo (BlockNumber _block) const |
BlockDetails | blockDetails (BlockNumber _block) const |
Transaction | transaction (BlockNumber _block, unsigned _i) const |
unsigned | transactionCount (BlockNumber _block) const |
Transactions | transactions (BlockNumber _block) const |
TransactionHashes | transactionHashes (BlockNumber _block) const |
BlockHeader | uncle (BlockNumber _block, unsigned _i) const |
UncleHashes | uncleHashes (BlockNumber _block) const |
unsigned | uncleCount (BlockNumber _block) const |
virtual Addresses | addresses () const |
Get a list of all active addresses. More... | |
virtual void | setAuthor (Address const &_us)=0 |
Set the block author address. More... | |
virtual bool | isSyncing () const |
Are we updating the chain (syncing or importing a new block)? More... | |
virtual bool | isMajorSyncing () const |
Are we syncing the chain? More... | |
virtual u256 | networkId () const |
Gets the network id. More... | |
virtual void | setNetworkId (u256 const &) |
Sets the network id. More... | |
virtual SealEngineFace * | sealEngine () const |
Get the seal engine. More... | |
Protected Member Functions | |
virtual BlockChain & | bc ()=0 |
The interface that must be implemented in any class deriving this. More... | |
virtual BlockChain const & | bc () const =0 |
virtual Block | block (h256 const &_h) const =0 |
virtual Block | preSeal () const =0 |
virtual Block | postSeal () const =0 |
virtual void | prepareForTransaction ()=0 |
Protected Attributes | |
TransactionQueue | m_tq |
} More... | |
Mutex | x_filtersWatches |
Our lock. More... | |
std::unordered_map< h256, InstalledFilter > | m_filters |
The dictionary of filters that are active. More... | |
std::unordered_map< h256, h256s > | m_specialFilters = std::unordered_map<h256, std::vector<h256>>{{PendingChangedFilter, {}}, {ChainChangedFilter, {}}} |
The dictionary of special filters and their additional data. More... | |
std::map< unsigned, ClientWatch > | m_watches |
Each and every watch - these reference a filter. More... | |
Protected Attributes inherited from dev::eth::Interface | |
int | m_default = PendingBlock |
Definition at line 76 of file ClientBase.h.
|
inline |
Definition at line 79 of file ClientBase.h.
|
inlinevirtual |
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 508 of file ClientBase.cpp.
|
overridevirtual |
Get the block author.
Implements dev::eth::Interface.
Reimplemented in dev::eth::Client.
Definition at line 521 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 163 of file ClientBase.cpp.
|
protectedpure virtual |
The interface that must be implemented in any class deriving this.
{
Implemented in dev::eth::Client, and dev::test::FixedClient.
|
protectedpure virtual |
Implemented in dev::eth::Client, and dev::test::FixedClient.
Block ClientBase::block | ( | BlockNumber | _h | ) | const |
Implemented in dev::eth::Client, and dev::test::FixedClient.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 381 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 374 of file ClientBase.cpp.
|
overridevirtual |
Makes the given call. Nothing is recorded into the state.
Implements dev::eth::Interface.
Definition at line 60 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 359 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 183 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 188 of file ClientBase.cpp.
Implements dev::eth::Interface.
Definition at line 546 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 168 of file ClientBase.cpp.
|
overridevirtual |
Makes the given create. Nothing is recorded into the state.
Implements dev::eth::Interface.
Definition at line 82 of file ClientBase.cpp.
|
overridevirtual |
Estimate gas usage for call/create.
_maxGas | An upper bound value for estimation, if not provided default value of c_maxGasEstimate will be used. |
_callback | Optional callback function for progress reporting |
Implements dev::eth::Interface.
Definition at line 103 of file ClientBase.cpp.
|
inlineoverridevirtual |
Reimplemented from dev::eth::Interface.
Definition at line 151 of file ClientBase.h.
|
inlineoverridevirtual |
Implements dev::eth::Interface.
Reimplemented in dev::eth::Client.
Definition at line 159 of file ClientBase.h.
|
overridevirtual |
Get the remaining gas limit in this block.
Implements dev::eth::Interface.
Reimplemented in dev::eth::Client.
Definition at line 516 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 526 of file ClientBase.cpp.
|
overridevirtual |
Injects the RLP-encoded block given by the _rlp into the block queue directly.
Implements dev::eth::Interface.
Definition at line 158 of file ClientBase.cpp.
|
inlineoverridevirtual |
Injects the RLP-encoded transaction given by the _rlp into the transaction queue directly.
Implements dev::eth::Interface.
Definition at line 153 of file ClientBase.h.
|
overridevirtual |
Install, uninstall and query watches.
Implements dev::eth::Interface.
Definition at line 290 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 304 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 558 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 566 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 573 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 578 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 391 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 407 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 418 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 199 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 214 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 481 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 535 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 347 of file ClientBase.cpp.
|
overridevirtual |
Get a map containing each of the pending transactions.
: Remove in favour of transactions().
Implements dev::eth::Interface.
Definition at line 486 of file ClientBase.cpp.
|
overridevirtual |
Reimplemented from dev::eth::Interface.
Definition at line 501 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 491 of file ClientBase.cpp.
|
overridevirtual |
Reimplemented from dev::eth::Interface.
Definition at line 496 of file ClientBase.cpp.
|
protectedpure virtual |
Implemented in dev::eth::Client, and dev::test::FixedClient.
|
protectedpure virtual |
Implemented in dev::eth::Client, and dev::test::FixedClient.
|
virtual |
|
protectedpure virtual |
Implemented in dev::eth::Client, and dev::test::FixedClient.
|
inlineoverridevirtual |
Start sealing.
NOT thread-safe - call it & stopSealing only from a single thread
Implements dev::eth::Interface.
Reimplemented in dev::eth::Client.
Definition at line 169 of file ClientBase.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 173 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 178 of file ClientBase.cpp.
|
inlineoverridevirtual |
Stop sealing.
NOT thread-safe
Implements dev::eth::Interface.
Reimplemented in dev::eth::Client.
Definition at line 170 of file ClientBase.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 193 of file ClientBase.cpp.
|
overridevirtual |
Submits the given transaction.
Implements dev::eth::Interface.
Definition at line 40 of file ClientBase.cpp.
|
inlineoverridevirtual |
Get some information on the block queue.
Implements dev::eth::Interface.
Reimplemented in dev::eth::Client.
Definition at line 173 of file ClientBase.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 386 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 397 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 467 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 447 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 432 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 413 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 437 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 452 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 474 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 462 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 325 of file ClientBase.cpp.
|
inlineoverridevirtual |
Would we like to be sealing now?
Implements dev::eth::Interface.
Reimplemented in dev::eth::Client.
Definition at line 171 of file ClientBase.h.
|
protected |
The dictionary of filters that are active.
Definition at line 192 of file ClientBase.h.
|
protected |
The dictionary of special filters and their additional data.
Definition at line 193 of file ClientBase.h.
|
protected |
}
Maintains a list of incoming transactions not yet in a block on the blockchain.
Definition at line 188 of file ClientBase.h.
|
protected |
Each and every watch - these reference a filter.
Definition at line 195 of file ClientBase.h.
|
mutableprotected |
Our lock.
Definition at line 191 of file ClientBase.h.