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

#include <BlockChainHelper.h>

Collaboration diagram for dev::test::TestBlock:
[legend]

Public Member Functions

 TestBlock ()
 
 TestBlock (std::string const &_blockRlp)
 
 TestBlock (mObject const &_blockObj, mObject const &_stateObj)
 
 TestBlock (TestBlock const &_original)
 
TestBlockoperator= (TestBlock const &_original)
 
void addTransaction (TestTransaction const &_tr)
 
void addUncle (TestBlock const &_uncle)
 
void setUncles (vector< TestBlock > const &_uncles)
 
void setPremine (std::string const &_parameter)
 
void noteDirty ()
 
void mine (TestBlockChain const &_bc)
 
void updateNonce (TestBlockChain const &_bc)
 
void verify (TestBlockChain const &_bc) const
 
void setBlockHeader (BlockHeader const &_header)
 
void setState (State const &_state)
 
void clearState ()
 
BlockHeader const & premineHeader ()
 
dev::bytes const & bytes () const
 
bytesConstRef receipts () const
 
AccountMap const & accountMap () const
 
State const & state () const
 
BlockHeader const & blockHeader () const
 
TransactionQueue const & transactionQueue () const
 
TransactionQueuetransactionQueue ()
 
vector< TestTransaction > const & testTransactions () const
 
vector< TestBlock > const & uncles () const
 
Address const & beneficiary () const
 

Private Member Functions

BlockHeader constructBlock (mObject const &_o, h256 const &_stateRoot)
 Test Block Private. More...
 
dev::bytes createBlockRLPFromFields (mObject const &_tObj, h256 const &_stateRoot=h256{})
 
void recalcBlockHeaderBytes ()
 
void copyStateFrom (State const &_state)
 
void populateFrom (TestBlock const &_original)
 
void premineUpdate (BlockHeader &info)
 

Private Attributes

bool m_dirty
 
BlockHeader m_blockHeader
 
vector< TestBlockm_uncles
 
std::unique_ptr< Statem_state
 
TransactionQueue m_transactionQueue
 
BlockQueue m_uncleQueue
 
dev::bytes m_bytes
 
std::unique_ptr< TransientDirectorym_tempDirState
 
vector< TestTransactionm_testTransactions
 
std::map< std::string, bool > m_premineUpdate
 
BlockHeader m_premineHeader
 
AccountMap m_accountMap
 
RLPStream m_receipts
 

Detailed Description

Definition at line 55 of file BlockChainHelper.h.

Constructor & Destructor Documentation

dev::test::TestBlock::TestBlock ( )

Definition at line 46 of file BlockChainHelper.cpp.

Here is the caller graph for this function:

dev::test::TestBlock::TestBlock ( std::string const &  _blockRlp)

Definition at line 68 of file BlockChainHelper.cpp.

Here is the call graph for this function:

dev::test::TestBlock::TestBlock ( mObject const &  _blockObj,
mObject const &  _stateObj 
)

Definition at line 51 of file BlockChainHelper.cpp.

Here is the call graph for this function:

dev::test::TestBlock::TestBlock ( TestBlock const &  _original)

Definition at line 95 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Member Function Documentation

AccountMap const& dev::test::TestBlock::accountMap ( ) const
inline

Definition at line 80 of file BlockChainHelper.h.

Here is the caller graph for this function:

void dev::test::TestBlock::addTransaction ( TestTransaction const &  _tr)

Definition at line 111 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::test::TestBlock::addUncle ( TestBlock const &  _uncle)

Definition at line 131 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Address const& dev::test::TestBlock::beneficiary ( ) const
inline

Definition at line 87 of file BlockChainHelper.h.

Here is the caller graph for this function:

BlockHeader const& dev::test::TestBlock::blockHeader ( ) const
inline

Definition at line 82 of file BlockChainHelper.h.

Here is the caller graph for this function:

dev::bytes const& dev::test::TestBlock::bytes ( ) const
inline

Definition at line 78 of file BlockChainHelper.h.

Here is the caller graph for this function:

void dev::test::TestBlock::clearState ( )

Definition at line 418 of file BlockChainHelper.cpp.

BlockHeader dev::test::TestBlock::constructBlock ( mObject const &  _o,
h256 const &  _stateRoot 
)
private

Test Block Private.

Definition at line 256 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::test::TestBlock::copyStateFrom ( State const &  _state)
private

Definition at line 409 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

dev::bytes dev::test::TestBlock::createBlockRLPFromFields ( mObject const &  _tObj,
h256 const &  _stateRoot = h256{} 
)
private

Definition at line 280 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::test::TestBlock::mine ( TestBlockChain const &  _bc)

!! Invalid transactions are dropped here

Definition at line 178 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::test::TestBlock::noteDirty ( )
inline

Definition at line 68 of file BlockChainHelper.h.

Here is the call graph for this function:

Here is the caller graph for this function:

TestBlock & dev::test::TestBlock::operator= ( TestBlock const &  _original)

Definition at line 100 of file BlockChainHelper.cpp.

Here is the call graph for this function:

void dev::test::TestBlock::populateFrom ( TestBlock const &  _original)
private

Definition at line 426 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

BlockHeader const& dev::test::TestBlock::premineHeader ( )
inline

Definition at line 77 of file BlockChainHelper.h.

void dev::test::TestBlock::premineUpdate ( BlockHeader info)
private

Definition at line 144 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::test::TestBlock::recalcBlockHeaderBytes ( )
private

Definition at line 376 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bytesConstRef dev::test::TestBlock::receipts ( ) const
inline

Definition at line 79 of file BlockChainHelper.h.

Here is the caller graph for this function:

void dev::test::TestBlock::setBlockHeader ( BlockHeader const &  _header)

Definition at line 249 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::test::TestBlock::setPremine ( std::string const &  _parameter)
inline

Definition at line 67 of file BlockChainHelper.h.

Here is the caller graph for this function:

void dev::test::TestBlock::setState ( State const &  _state)

Definition at line 106 of file BlockChainHelper.cpp.

Here is the call graph for this function:

void dev::test::TestBlock::setUncles ( vector< TestBlock > const &  _uncles)

Definition at line 137 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

State const& dev::test::TestBlock::state ( ) const
inline

Definition at line 81 of file BlockChainHelper.h.

Here is the caller graph for this function:

vector<TestTransaction> const& dev::test::TestBlock::testTransactions ( ) const
inline

Definition at line 85 of file BlockChainHelper.h.

Here is the caller graph for this function:

TransactionQueue const& dev::test::TestBlock::transactionQueue ( ) const
inline

Definition at line 83 of file BlockChainHelper.h.

Here is the caller graph for this function:

TransactionQueue& dev::test::TestBlock::transactionQueue ( )
inline

Definition at line 84 of file BlockChainHelper.h.

vector<TestBlock> const& dev::test::TestBlock::uncles ( ) const
inline

Definition at line 86 of file BlockChainHelper.h.

Here is the caller graph for this function:

void dev::test::TestBlock::updateNonce ( TestBlockChain const &  _bc)

Definition at line 335 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::test::TestBlock::verify ( TestBlockChain const &  _bc) const

Definition at line 348 of file BlockChainHelper.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

AccountMap dev::test::TestBlock::m_accountMap
private

Definition at line 108 of file BlockChainHelper.h.

BlockHeader dev::test::TestBlock::m_blockHeader
private

Definition at line 98 of file BlockChainHelper.h.

dev::bytes dev::test::TestBlock::m_bytes
private

Definition at line 103 of file BlockChainHelper.h.

bool dev::test::TestBlock::m_dirty
private

Definition at line 97 of file BlockChainHelper.h.

BlockHeader dev::test::TestBlock::m_premineHeader
private

Definition at line 107 of file BlockChainHelper.h.

std::map<std::string, bool> dev::test::TestBlock::m_premineUpdate
private

Definition at line 106 of file BlockChainHelper.h.

RLPStream dev::test::TestBlock::m_receipts
private

Definition at line 109 of file BlockChainHelper.h.

std::unique_ptr<State> dev::test::TestBlock::m_state
private

Definition at line 100 of file BlockChainHelper.h.

std::unique_ptr<TransientDirectory> dev::test::TestBlock::m_tempDirState
private

Definition at line 104 of file BlockChainHelper.h.

vector<TestTransaction> dev::test::TestBlock::m_testTransactions
private

Definition at line 105 of file BlockChainHelper.h.

TransactionQueue dev::test::TestBlock::m_transactionQueue
private

Definition at line 101 of file BlockChainHelper.h.

BlockQueue dev::test::TestBlock::m_uncleQueue
private

Definition at line 102 of file BlockChainHelper.h.

vector<TestBlock> dev::test::TestBlock::m_uncles
private

Definition at line 99 of file BlockChainHelper.h.


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