Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
wallet::MockableBatch Class Reference

#include <util.h>

Inheritance diagram for wallet::MockableBatch:
[legend]
Collaboration diagram for wallet::MockableBatch:
[legend]

Public Member Functions

 MockableBatch (MockableData &records, bool pass)
 ~MockableBatch ()=default
void Close () override
std::unique_ptr< DatabaseCursorGetNewCursor () override
std::unique_ptr< DatabaseCursorGetNewPrefixCursor (std::span< const std::byte > prefix) override
bool TxnBegin () override
bool TxnCommit () override
bool TxnAbort () override
bool HasActiveTxn () override
Public Member Functions inherited from wallet::DatabaseBatch
 DatabaseBatch ()=default
virtual ~DatabaseBatch ()=default
 DatabaseBatch (const DatabaseBatch &)=delete
DatabaseBatchoperator= (const DatabaseBatch &)=delete
template<typename K, typename T>
bool Read (const K &key, T &value)
template<typename K, typename T>
bool Write (const K &key, const T &value, bool fOverwrite=true)
template<typename K>
bool Erase (const K &key)
template<typename K>
bool Exists (const K &key)

Private Member Functions

bool ReadKey (DataStream &&key, DataStream &value) override
bool WriteKey (DataStream &&key, DataStream &&value, bool overwrite=true) override
bool EraseKey (DataStream &&key) override
bool HasKey (DataStream &&key) override
bool ErasePrefix (std::span< const std::byte > prefix) override

Private Attributes

MockableDatam_records
bool m_pass

Detailed Description

Definition at line 65 of file util.h.

Constructor & Destructor Documentation

◆ MockableBatch()

wallet::MockableBatch::MockableBatch ( MockableData & records,
bool pass )
inlineexplicit

Definition at line 78 of file util.h.

◆ ~MockableBatch()

wallet::MockableBatch::~MockableBatch ( )
default

Member Function Documentation

◆ Close()

void wallet::MockableBatch::Close ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 81 of file util.h.

◆ EraseKey()

bool wallet::MockableBatch::EraseKey ( DataStream && key)
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 175 of file util.cpp.

◆ ErasePrefix()

bool wallet::MockableBatch::ErasePrefix ( std::span< const std::byte > prefix)
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 194 of file util.cpp.

◆ GetNewCursor()

std::unique_ptr< DatabaseCursor > wallet::MockableBatch::GetNewCursor ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 83 of file util.h.

◆ GetNewPrefixCursor()

std::unique_ptr< DatabaseCursor > wallet::MockableBatch::GetNewPrefixCursor ( std::span< const std::byte > prefix)
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 87 of file util.h.

◆ HasActiveTxn()

bool wallet::MockableBatch::HasActiveTxn ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 93 of file util.h.

◆ HasKey()

bool wallet::MockableBatch::HasKey ( DataStream && key)
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 185 of file util.cpp.

◆ ReadKey()

bool wallet::MockableBatch::ReadKey ( DataStream && key,
DataStream & value )
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 145 of file util.cpp.

Here is the call graph for this function:

◆ TxnAbort()

bool wallet::MockableBatch::TxnAbort ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 92 of file util.h.

◆ TxnBegin()

bool wallet::MockableBatch::TxnBegin ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 90 of file util.h.

◆ TxnCommit()

bool wallet::MockableBatch::TxnCommit ( )
inlineoverridevirtual

Implements wallet::DatabaseBatch.

Definition at line 91 of file util.h.

◆ WriteKey()

bool wallet::MockableBatch::WriteKey ( DataStream && key,
DataStream && value,
bool overwrite = true )
overrideprivatevirtual

Implements wallet::DatabaseBatch.

Definition at line 160 of file util.cpp.

Member Data Documentation

◆ m_pass

bool wallet::MockableBatch::m_pass
private

Definition at line 69 of file util.h.

◆ m_records

MockableData& wallet::MockableBatch::m_records
private

Definition at line 68 of file util.h.


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