Ethereum  PoC-8
The C++ Implementation of Ethereum
dev::OverlayDB Class Reference

#include <OverlayDB.h>

Inheritance diagram for dev::OverlayDB:
dev::StateCacheDB

Public Member Functions

 OverlayDB (std::unique_ptr< db::DatabaseFace > _db=nullptr)
 
 ~OverlayDB ()
 
 OverlayDB (OverlayDB const &)=default
 
OverlayDBoperator= (OverlayDB const &)=default
 
 OverlayDB (OverlayDB &&)=default
 
OverlayDBoperator= (OverlayDB &&)=default
 
void commit ()
 
void rollback ()
 
std::string lookup (h256 const &_h) const
 
bool exists (h256 const &_h) const
 
void kill (h256 const &_h)
 
bytes lookupAux (h256 const &_h) const
 
- Public Member Functions inherited from dev::StateCacheDB
 StateCacheDB ()
 
 StateCacheDB (StateCacheDB const &_c)
 
StateCacheDBoperator= (StateCacheDB const &_c)
 
virtual ~StateCacheDB ()=default
 
void clear ()
 
std::unordered_map< h256, std::string > get () const
 
std::string lookup (h256 const &_h) const
 
bool exists (h256 const &_h) const
 
void insert (h256 const &_h, bytesConstRef _v)
 
bool kill (h256 const &_h)
 
void purge ()
 
bytes lookupAux (h256 const &_h) const
 
void removeAux (h256 const &_h)
 
void insertAux (h256 const &_h, bytesConstRef _v)
 
h256Hash keys () const
 

Additional Inherited Members

- Protected Attributes inherited from dev::StateCacheDB
std::unordered_map< h256, std::pair< std::string, unsigned > > m_main
 
std::unordered_map< h256, std::pair< bytes, bool > > m_aux
 
bool m_enforceRefs = false
 

Detailed Description

Definition at line 33 of file OverlayDB.h.

Constructor & Destructor Documentation

◆ OverlayDB() [1/3]

dev::OverlayDB::OverlayDB ( std::unique_ptr< db::DatabaseFace _db = nullptr)
inlineexplicit

Definition at line 36 of file OverlayDB.h.

◆ ~OverlayDB()

dev::OverlayDB::~OverlayDB ( )
default

◆ OverlayDB() [2/3]

dev::OverlayDB::OverlayDB ( OverlayDB const &  )
default

◆ OverlayDB() [3/3]

dev::OverlayDB::OverlayDB ( OverlayDB &&  )
default

Member Function Documentation

◆ commit()

void dev::OverlayDB::commit ( )

Definition at line 48 of file OverlayDB.cpp.

◆ exists()

bool dev::OverlayDB::exists ( h256 const &  _h) const

Definition at line 134 of file OverlayDB.cpp.

◆ kill()

void dev::OverlayDB::kill ( h256 const &  _h)

Definition at line 141 of file OverlayDB.cpp.

◆ lookup()

std::string dev::OverlayDB::lookup ( h256 const &  _h) const

Definition at line 125 of file OverlayDB.cpp.

◆ lookupAux()

bytes dev::OverlayDB::lookupAux ( h256 const &  _h) const

Definition at line 102 of file OverlayDB.cpp.

◆ operator=() [1/2]

OverlayDB& dev::OverlayDB::operator= ( OverlayDB &&  )
default

◆ operator=() [2/2]

OverlayDB& dev::OverlayDB::operator= ( OverlayDB const &  )
default

◆ rollback()

void dev::OverlayDB::rollback ( )

Definition at line 117 of file OverlayDB.cpp.


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