Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
dev::test::FixedClient Class Reference

mvp implementation of ClientBase Doesn't support mining interface More...

#include <FixedClient.h>

Inheritance diagram for dev::test::FixedClient:
[legend]
Collaboration diagram for dev::test::FixedClient:
[legend]

Public Member Functions

 FixedClient (eth::BlockChain const &_bc, eth::Block const &_block)
 
virtual ~FixedClient ()
 
virtual void flushTransactions () override
 Blocks until all pending transactions have been processed. More...
 
virtual eth::BlockChainbc () override
 The interface that must be implemented in any class deriving this. More...
 
virtual eth::BlockChain const & bc () const override
 
virtual eth::Block block (h256 const &_h) const override
 
virtual eth::Block preSeal () const override
 
virtual eth::Block postSeal () const override
 
virtual void setAuthor (Address const &_us) override
 Set the block author address. More...
 
virtual void prepareForTransaction () override
 
- Public Member Functions inherited from dev::eth::ClientBase
 ClientBase (TransactionQueue::Limits const &_l=TransactionQueue::Limits{1024, 1024})
 
virtual ~ClientBase ()
 
virtual std::pair< h256, AddresssubmitTransaction (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, ExecutionResultestimateGas (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...
 
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 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 SealEngineFacesealEngine () const
 Get the seal engine. More...
 

Private Attributes

eth::BlockChain const & m_bc
 
eth::Block m_block
 
SharedMutex x_stateDB
 Lock on the state DB, effectively a lock on m_postSeal. More...
 

Additional Inherited Members

- Protected Attributes inherited from dev::eth::ClientBase
TransactionQueue m_tq
 } More...
 
Mutex x_filtersWatches
 Our lock. More...
 
std::unordered_map< h256, InstalledFilterm_filters
 The dictionary of filters that are active. More...
 
std::unordered_map< h256, h256sm_specialFilters = std::unordered_map<h256, std::vector<h256>>{{PendingChangedFilter, {}}, {ChainChangedFilter, {}}}
 The dictionary of special filters and their additional data. More...
 
std::map< unsigned, ClientWatchm_watches
 Each and every watch - these reference a filter. More...
 
- Protected Attributes inherited from dev::eth::Interface
int m_default = PendingBlock
 

Detailed Description

mvp implementation of ClientBase Doesn't support mining interface

Definition at line 37 of file FixedClient.h.

Constructor & Destructor Documentation

dev::test::FixedClient::FixedClient ( eth::BlockChain const &  _bc,
eth::Block const &  _block 
)
inline

Definition at line 40 of file FixedClient.h.

virtual dev::test::FixedClient::~FixedClient ( )
inlinevirtual

Definition at line 41 of file FixedClient.h.

Member Function Documentation

virtual eth::BlockChain& dev::test::FixedClient::bc ( )
inlineoverridevirtual

The interface that must be implemented in any class deriving this.

{

Implements dev::eth::ClientBase.

Definition at line 45 of file FixedClient.h.

virtual eth::BlockChain const& dev::test::FixedClient::bc ( ) const
inlineoverridevirtual

Implements dev::eth::ClientBase.

Definition at line 46 of file FixedClient.h.

Here is the call graph for this function:

Block FixedClient::block ( h256 const &  _h) const
overridevirtual

Implements dev::eth::ClientBase.

Definition at line 28 of file FixedClient.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void dev::test::FixedClient::flushTransactions ( )
inlineoverridevirtual

Blocks until all pending transactions have been processed.

Implements dev::eth::Interface.

Definition at line 44 of file FixedClient.h.

virtual eth::Block dev::test::FixedClient::postSeal ( ) const
inlineoverridevirtual

Implements dev::eth::ClientBase.

Definition at line 50 of file FixedClient.h.

virtual void dev::test::FixedClient::prepareForTransaction ( )
inlineoverridevirtual

Implements dev::eth::ClientBase.

Definition at line 52 of file FixedClient.h.

virtual eth::Block dev::test::FixedClient::preSeal ( ) const
inlineoverridevirtual

Implements dev::eth::ClientBase.

Definition at line 49 of file FixedClient.h.

virtual void dev::test::FixedClient::setAuthor ( Address const &  _us)
inlineoverridevirtual

Set the block author address.

Implements dev::eth::Interface.

Definition at line 51 of file FixedClient.h.

Here is the call graph for this function:

Member Data Documentation

eth::BlockChain const& dev::test::FixedClient::m_bc
private

Definition at line 55 of file FixedClient.h.

eth::Block dev::test::FixedClient::m_block
private

Definition at line 56 of file FixedClient.h.

SharedMutex dev::test::FixedClient::x_stateDB
mutableprivate

Lock on the state DB, effectively a lock on m_postSeal.

Definition at line 57 of file FixedClient.h.


The documentation for this class was generated from the following files: