Monero
testdb.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2018, The Monero Project
2 //
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without modification, are
6 // permitted provided that the following conditions are met:
7 //
8 // 1. Redistributions of source code must retain the above copyright notice, this list of
9 // conditions and the following disclaimer.
10 //
11 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
12 // of conditions and the following disclaimer in the documentation and/or other
13 // materials provided with the distribution.
14 //
15 // 3. Neither the name of the copyright holder nor the names of its contributors may be
16 // used to endorse or promote products derived from this software without specific
17 // prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27 // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 //
29 // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
30 
31 #pragma once
32 
33 #include <string>
34 #include <vector>
35 #include <map>
36 
37 #include "blockchain_db.h"
38 
39 namespace cryptonote
40 {
41 
43 public:
45  virtual void open(const std::string& filename, const int db_flags = 0) { }
46  virtual void close() {}
47  virtual void sync() {}
48  virtual void safesyncmode(const bool onoff) {}
49  virtual void reset() {}
50  virtual std::vector<std::string> get_filenames() const { return std::vector<std::string>(); }
51  virtual bool remove_data_file(const std::string& folder) const { return true; }
52  virtual std::string get_db_name() const { return std::string(); }
53  virtual bool lock() { return true; }
54  virtual void unlock() { }
55  virtual bool batch_start(uint64_t batch_num_blocks=0, uint64_t batch_bytes=0) { return true; }
56  virtual void batch_stop() {}
57  virtual void set_batch_transactions(bool) {}
58  virtual void block_txn_start(bool readonly=false) {}
59  virtual void block_txn_stop() {}
60  virtual void block_txn_abort() {}
61  virtual void drop_hard_fork_info() {}
62  virtual bool block_exists(const crypto::hash& h, uint64_t *height) const { return false; }
65  virtual bool get_tx_blob(const crypto::hash& h, cryptonote::blobdata &tx) const { return false; }
66  virtual bool get_pruned_tx_blob(const crypto::hash& h, cryptonote::blobdata &tx) const { return false; }
67  virtual bool get_prunable_tx_blob(const crypto::hash& h, cryptonote::blobdata &tx) const { return false; }
68  virtual bool get_prunable_tx_hash(const crypto::hash& tx_hash, crypto::hash &prunable_hash) const { return false; }
69  virtual uint64_t get_block_height(const crypto::hash& h) const { return 0; }
71  virtual uint64_t get_block_timestamp(const uint64_t& height) const { return 0; }
72  virtual std::vector<uint64_t> get_block_cumulative_rct_outputs(const std::vector<uint64_t> &heights) const { return {}; }
73  virtual uint64_t get_top_block_timestamp() const { return 0; }
74  virtual size_t get_block_weight(const uint64_t& height) const { return 128; }
75  virtual cryptonote::difficulty_type get_block_cumulative_difficulty(const uint64_t& height) const { return 10; }
76  virtual cryptonote::difficulty_type get_block_difficulty(const uint64_t& height) const { return 0; }
77  virtual uint64_t get_block_already_generated_coins(const uint64_t& height) const { return 10000000000; }
78  virtual uint64_t get_block_long_term_weight(const uint64_t& height) const { return 128; }
79  virtual crypto::hash get_block_hash_from_height(const uint64_t& height) const { return crypto::hash(); }
80  virtual std::vector<cryptonote::block> get_blocks_range(const uint64_t& h1, const uint64_t& h2) const { return std::vector<cryptonote::block>(); }
81  virtual std::vector<crypto::hash> get_hashes_range(const uint64_t& h1, const uint64_t& h2) const { return std::vector<crypto::hash>(); }
82  virtual crypto::hash top_block_hash() const { return crypto::hash(); }
83  virtual cryptonote::block get_top_block() const { return cryptonote::block(); }
84  virtual uint64_t height() const { return 1; }
85  virtual bool tx_exists(const crypto::hash& h) const { return false; }
86  virtual bool tx_exists(const crypto::hash& h, uint64_t& tx_index) const { return false; }
87  virtual uint64_t get_tx_unlock_time(const crypto::hash& h) const { return 0; }
89  virtual bool get_tx(const crypto::hash& h, cryptonote::transaction &tx) const { return false; }
90  virtual uint64_t get_tx_count() const { return 0; }
91  virtual std::vector<cryptonote::transaction> get_tx_list(const std::vector<crypto::hash>& hlist) const { return std::vector<cryptonote::transaction>(); }
92  virtual uint64_t get_tx_block_height(const crypto::hash& h) const { return 0; }
93  virtual uint64_t get_num_outputs(const uint64_t& amount) const { return 1; }
94  virtual uint64_t get_indexing_base() const { return 0; }
95  virtual cryptonote::output_data_t get_output_key(const uint64_t& amount, const uint64_t& index) { return cryptonote::output_data_t(); }
97  virtual cryptonote::tx_out_index get_output_tx_and_index(const uint64_t& amount, const uint64_t& index) const { return cryptonote::tx_out_index(); }
98  virtual void get_output_tx_and_index(const uint64_t& amount, const std::vector<uint64_t> &offsets, std::vector<cryptonote::tx_out_index> &indices) const {}
99  virtual void get_output_key(const uint64_t &amount, const std::vector<uint64_t> &offsets, std::vector<cryptonote::output_data_t> &outputs, bool allow_partial = false) {}
100  virtual bool can_thread_bulk_indices() const { return false; }
101  virtual std::vector<uint64_t> get_tx_output_indices(const crypto::hash& h) const { return std::vector<uint64_t>(); }
102  virtual std::vector<uint64_t> get_tx_amount_output_indices(const uint64_t tx_index) const { return std::vector<uint64_t>(); }
103  virtual bool has_key_image(const crypto::key_image& img) const { return false; }
104  virtual void remove_block() { }
105  virtual uint64_t add_transaction_data(const crypto::hash& blk_hash, const cryptonote::transaction& tx, const crypto::hash& tx_hash, const crypto::hash& tx_prunable_hash) {return 0;}
106  virtual void remove_transaction_data(const crypto::hash& tx_hash, const cryptonote::transaction& tx) {}
107  virtual uint64_t add_output(const crypto::hash& tx_hash, const cryptonote::tx_out& tx_output, const uint64_t& local_index, const uint64_t unlock_time, const rct::key *commitment) {return 0;}
108  virtual void add_tx_amount_output_indices(const uint64_t tx_index, const std::vector<uint64_t>& amount_output_indices) {}
109  virtual void add_spent_key(const crypto::key_image& k_image) {}
110  virtual void remove_spent_key(const crypto::key_image& k_image) {}
111 
112  virtual bool for_all_key_images(std::function<bool(const crypto::key_image&)>) const { return true; }
113  virtual bool for_blocks_range(const uint64_t&, const uint64_t&, std::function<bool(uint64_t, const crypto::hash&, const cryptonote::block&)>) const { return true; }
114  virtual bool for_all_transactions(std::function<bool(const crypto::hash&, const cryptonote::transaction&)>, bool pruned) const { return true; }
115  virtual bool for_all_outputs(std::function<bool(uint64_t amount, const crypto::hash &tx_hash, uint64_t height, size_t tx_idx)> f) const { return true; }
116  virtual bool for_all_outputs(uint64_t amount, const std::function<bool(uint64_t height)> &f) const { return true; }
117  virtual bool is_read_only() const { return false; }
118  virtual std::map<uint64_t, std::tuple<uint64_t, uint64_t, uint64_t>> get_output_histogram(const std::vector<uint64_t> &amounts, bool unlocked, uint64_t recent_cutoff, uint64_t min_count) const { return std::map<uint64_t, std::tuple<uint64_t, uint64_t, uint64_t>>(); }
119  virtual bool get_output_distribution(uint64_t amount, uint64_t from_height, uint64_t to_height, std::vector<uint64_t> &distribution, uint64_t &base) const { return false; }
120 
121  virtual void add_txpool_tx(const cryptonote::transaction &tx, const cryptonote::txpool_tx_meta_t& details) {}
122  virtual void update_txpool_tx(const crypto::hash &txid, const cryptonote::txpool_tx_meta_t& details) {}
123  virtual uint64_t get_txpool_tx_count(bool include_unrelayed_txes = true) const { return 0; }
124  virtual bool txpool_has_tx(const crypto::hash &txid) const { return false; }
125  virtual void remove_txpool_tx(const crypto::hash& txid) {}
126  virtual bool get_txpool_tx_meta(const crypto::hash& txid, cryptonote::txpool_tx_meta_t &meta) const { return false; }
127  virtual bool get_txpool_tx_blob(const crypto::hash& txid, cryptonote::blobdata &bd) const { return false; }
128  virtual uint64_t get_database_size() const { return 0; }
129  virtual cryptonote::blobdata get_txpool_tx_blob(const crypto::hash& txid) const { return ""; }
130  virtual bool for_all_txpool_txes(std::function<bool(const crypto::hash&, const cryptonote::txpool_tx_meta_t&, const cryptonote::blobdata*)>, bool include_blob = false, bool include_unrelayed_txes = false) const { return false; }
131 
132  virtual void add_block( const cryptonote::block& blk
133  , size_t block_weight
134  , uint64_t long_term_block_weight
135  , const cryptonote::difficulty_type& cumulative_difficulty
136  , const uint64_t& coins_generated
137  , uint64_t num_rct_outs
138  , const crypto::hash& blk_hash
139  ) { }
140  virtual cryptonote::block get_block_from_height(const uint64_t& height) const { return cryptonote::block(); }
141  virtual void set_hard_fork_version(uint64_t height, uint8_t version) {}
142  virtual uint8_t get_hard_fork_version(uint64_t height) const { return 0; }
143  virtual void check_hard_fork_info() {}
144 
145  virtual uint32_t get_blockchain_pruning_seed() const { return 0; }
146  virtual bool prune_blockchain(uint32_t pruning_seed = 0) { return true; }
147  virtual bool update_pruning() { return true; }
148  virtual bool check_pruning() { return true; }
149  virtual void prune_outputs(uint64_t amount) {}
150 };
151 
152 }
virtual cryptonote::difficulty_type get_block_difficulty(const uint64_t &height) const
fetch a block's difficulty
Definition: testdb.h:76
virtual void prune_outputs(uint64_t amount)
Definition: testdb.h:149
virtual uint64_t get_tx_count() const
fetches the total number of transactions ever
Definition: testdb.h:90
virtual uint8_t get_hard_fork_version(uint64_t height) const
checks which hardfork version a height is on
Definition: testdb.h:142
virtual std::vector< uint64_t > get_tx_amount_output_indices(const uint64_t tx_index) const
gets output indices (amount-specific) for a transaction's outputs
Definition: testdb.h:102
virtual bool get_txpool_tx_blob(const crypto::hash &txid, cryptonote::blobdata &bd) const
get a txpool transaction's blob
Definition: testdb.h:127
virtual void sync()
sync the BlockchainDB with disk
Definition: testdb.h:47
virtual uint64_t get_tx_unlock_time(const crypto::hash &h) const
fetch a transaction's unlock time/height
Definition: testdb.h:87
virtual std::string get_db_name() const
gets the name of the folder the BlockchainDB's file(s) should be in
Definition: testdb.h:52
virtual uint64_t get_block_long_term_weight(const uint64_t &height) const
fetch a block's long term weight
Definition: testdb.h:78
virtual std::vector< cryptonote::transaction > get_tx_list(const std::vector< crypto::hash > &hlist) const
fetches a list of transactions based on their hashes
Definition: testdb.h:91
virtual bool get_output_distribution(uint64_t amount, uint64_t from_height, uint64_t to_height, std::vector< uint64_t > &distribution, uint64_t &base) const
Definition: testdb.h:119
virtual uint64_t add_output(const crypto::hash &tx_hash, const cryptonote::tx_out &tx_output, const uint64_t &local_index, const uint64_t unlock_time, const rct::key *commitment)
store an output
Definition: testdb.h:107
virtual bool tx_exists(const crypto::hash &h) const
check if a transaction with a given hash exists
Definition: testdb.h:85
Definition: cryptonote_basic.h:366
virtual bool get_prunable_tx_blob(const crypto::hash &h, cryptonote::blobdata &tx) const
Definition: testdb.h:67
Definition: cryptonote_basic.h:349
virtual void add_tx_amount_output_indices(const uint64_t tx_index, const std::vector< uint64_t > &amount_output_indices)
store amount output indices for a tx's outputs
Definition: testdb.h:108
virtual cryptonote::output_data_t get_output_key(const uint64_t &amount, const uint64_t &index)
get some of an output's data
Definition: testdb.h:95
virtual bool check_pruning()
Definition: testdb.h:148
virtual cryptonote::transaction get_tx(const crypto::hash &h) const
fetches the transaction with the given hash
Definition: testdb.h:88
virtual uint64_t get_tx_block_height(const crypto::hash &h) const
fetches the height of a transaction's block
Definition: testdb.h:92
virtual void block_txn_stop()
Definition: testdb.h:59
virtual void safesyncmode(const bool onoff)
toggle safe syncs for the DB
Definition: testdb.h:48
virtual void get_output_tx_and_index(const uint64_t &amount, const std::vector< uint64_t > &offsets, std::vector< cryptonote::tx_out_index > &indices) const
Definition: testdb.h:98
virtual crypto::hash get_block_hash_from_height(const uint64_t &height) const
fetch a block's hash
Definition: testdb.h:79
virtual bool for_all_transactions(std::function< bool(const crypto::hash &, const cryptonote::transaction &)>, bool pruned) const
runs a function over all transactions stored
Definition: testdb.h:114
virtual bool update_pruning()
Definition: testdb.h:147
virtual bool txpool_has_tx(const crypto::hash &txid) const
check whether a txid is in the txpool
Definition: testdb.h:124
virtual uint32_t get_blockchain_pruning_seed() const
Definition: testdb.h:145
virtual cryptonote::block_header get_block_header(const crypto::hash &h) const
fetch a block header
Definition: testdb.h:70
virtual uint64_t add_transaction_data(const crypto::hash &blk_hash, const cryptonote::transaction &tx, const crypto::hash &tx_hash, const crypto::hash &tx_prunable_hash)
store the transaction and its metadata
Definition: testdb.h:105
virtual bool has_key_image(const crypto::key_image &img) const
check if a key image is stored as spent
Definition: testdb.h:103
virtual void remove_transaction_data(const crypto::hash &tx_hash, const cryptonote::transaction &tx)
remove data about a transaction
Definition: testdb.h:106
virtual uint64_t get_num_outputs(const uint64_t &amount) const
fetches the number of outputs of a given amount
Definition: testdb.h:93
virtual void set_batch_transactions(bool)
sets whether or not to batch transactions
Definition: testdb.h:57
virtual uint64_t height() const
fetch the current blockchain height
Definition: testdb.h:84
virtual bool get_prunable_tx_hash(const crypto::hash &tx_hash, crypto::hash &prunable_hash) const
fetches the prunable transaction hash
Definition: testdb.h:68
virtual bool get_txpool_tx_meta(const crypto::hash &txid, cryptonote::txpool_tx_meta_t &meta) const
get a txpool transaction's metadata
Definition: testdb.h:126
virtual bool get_pruned_tx_blob(const crypto::hash &h, cryptonote::blobdata &tx) const
fetches the pruned transaction blob with the given hash
Definition: testdb.h:66
Holds cryptonote related classes and helpers.
Definition: db_bdb.cpp:224
virtual cryptonote::block get_top_block() const
fetch the top block
Definition: testdb.h:83
virtual cryptonote::block get_block_from_height(const uint64_t &height) const
fetch a block by height
Definition: testdb.h:140
virtual cryptonote::blobdata get_block_blob_from_height(const uint64_t &height) const
fetch a block blob by height
Definition: testdb.h:63
virtual cryptonote::blobdata get_block_blob(const crypto::hash &h) const
fetches the block with the given hash
Definition: testdb.h:64
virtual cryptonote::difficulty_type get_block_cumulative_difficulty(const uint64_t &height) const
fetch a block's cumulative difficulty
Definition: testdb.h:75
virtual std::map< uint64_t, std::tuple< uint64_t, uint64_t, uint64_t > > get_output_histogram(const std::vector< uint64_t > &amounts, bool unlocked, uint64_t recent_cutoff, uint64_t min_count) const
return a histogram of outputs on the blockchain
Definition: testdb.h:118
virtual void reset()
Remove everything from the BlockchainDB.
Definition: testdb.h:49
virtual uint64_t get_top_block_timestamp() const
fetch the top block's timestamp
Definition: testdb.h:73
virtual bool for_all_outputs(uint64_t amount, const std::function< bool(uint64_t height)> &f) const
Definition: testdb.h:116
virtual uint64_t get_block_already_generated_coins(const uint64_t &height) const
fetch a block's already generated coins
Definition: testdb.h:77
virtual bool get_tx_blob(const crypto::hash &h, cryptonote::blobdata &tx) const
fetches the transaction blob with the given hash
Definition: testdb.h:65
virtual bool block_exists(const crypto::hash &h, uint64_t *height) const
checks if a block exists
Definition: testdb.h:62
virtual std::vector< uint64_t > get_tx_output_indices(const crypto::hash &h) const
Definition: testdb.h:101
Definition: testdb.h:42
virtual std::vector< crypto::hash > get_hashes_range(const uint64_t &h1, const uint64_t &h2) const
fetch a list of block hashes
Definition: testdb.h:81
Definition: rctTypes.h:78
virtual std::vector< std::string > get_filenames() const
get all files used by the BlockchainDB (if any)
Definition: testdb.h:50
virtual std::vector< cryptonote::block > get_blocks_range(const uint64_t &h1, const uint64_t &h2) const
fetch a list of blocks
Definition: testdb.h:80
virtual void remove_block()
remove data about the top block
Definition: testdb.h:104
virtual uint64_t get_txpool_tx_count(bool include_unrelayed_txes=true) const
get the number of transactions in the txpool
Definition: testdb.h:123
bool t_serializable_object_to_blob(const t_object &to, blobdata &b_blob)
Definition: cryptonote_format_utils.h:135
virtual bool for_all_txpool_txes(std::function< bool(const crypto::hash &, const cryptonote::txpool_tx_meta_t &, const cryptonote::blobdata *)>, bool include_blob=false, bool include_unrelayed_txes=false) const
Definition: testdb.h:130
virtual uint64_t get_block_timestamp(const uint64_t &height) const
fetch a block's timestamp
Definition: testdb.h:71
virtual bool tx_exists(const crypto::hash &h, uint64_t &tx_index) const
Definition: testdb.h:86
virtual cryptonote::blobdata get_txpool_tx_blob(const crypto::hash &txid) const
get a txpool transaction's blob
Definition: testdb.h:129
virtual void block_txn_abort()
Definition: testdb.h:60
uint8_t version
Definition: blockchain.cpp:88
virtual uint64_t get_block_height(const crypto::hash &h) const
gets the height of the block with a given hash
Definition: testdb.h:69
std::string blobdata
Definition: blobdatatype.h:35
virtual uint64_t get_database_size() const
get disk space requirements
Definition: testdb.h:128
Definition: base.py:1
virtual bool get_tx(const crypto::hash &h, cryptonote::transaction &tx) const
fetches the transaction with the given hash
Definition: testdb.h:89
virtual bool lock()
acquires the BlockchainDB lock
Definition: testdb.h:53
virtual bool for_blocks_range(const uint64_t &, const uint64_t &, std::function< bool(uint64_t, const crypto::hash &, const cryptonote::block &)>) const
runs a function over a range of blocks
Definition: testdb.h:113
virtual void drop_hard_fork_info()
delete hard fork info from database
Definition: testdb.h:61
virtual void remove_txpool_tx(const crypto::hash &txid)
remove a txpool transaction
Definition: testdb.h:125
std::uint64_t difficulty_type
Definition: difficulty.h:40
virtual bool prune_blockchain(uint32_t pruning_seed=0)
Definition: testdb.h:146
virtual void remove_spent_key(const crypto::key_image &k_image)
remove a spent key
Definition: testdb.h:110
virtual void add_spent_key(const crypto::key_image &k_image)
store a spent key
Definition: testdb.h:109
virtual bool can_thread_bulk_indices() const
Definition: testdb.h:100
virtual void add_block(const cryptonote::block &blk, size_t block_weight, uint64_t long_term_block_weight, const cryptonote::difficulty_type &cumulative_difficulty, const uint64_t &coins_generated, uint64_t num_rct_outs, const crypto::hash &blk_hash)
add the block and metadata to the db
Definition: testdb.h:132
POD_CLASS key_image
Definition: crypto.h:89
virtual void check_hard_fork_info()
verify hard fork info in database
Definition: testdb.h:143
a struct containing txpool per transaction metadata
Definition: blockchain_db.h:136
virtual bool batch_start(uint64_t batch_num_blocks=0, uint64_t batch_bytes=0)
tells the BlockchainDB to start a new "batch" of blocks
Definition: testdb.h:55
virtual cryptonote::tx_out_index get_output_tx_and_index(const uint64_t &amount, const uint64_t &index) const
gets an output's tx hash and index
Definition: testdb.h:97
static uint64_t db_flags
Definition: blockchain_blackball.cpp:57
virtual void close()
close the BlockchainDB
Definition: testdb.h:46
virtual void set_hard_fork_version(uint64_t height, uint8_t version)
sets which hardfork version a height is on
Definition: testdb.h:141
virtual std::vector< uint64_t > get_block_cumulative_rct_outputs(const std::vector< uint64_t > &heights) const
fetch a block's cumulative number of rct outputs
Definition: testdb.h:72
The BlockchainDB backing store interface declaration/contract.
Definition: blockchain_db.h:343
virtual void batch_stop()
ends a batch transaction
Definition: testdb.h:56
virtual void get_output_key(const uint64_t &amount, const std::vector< uint64_t > &offsets, std::vector< cryptonote::output_data_t > &outputs, bool allow_partial=false)
Definition: testdb.h:99
virtual void open(const std::string &filename, const int db_flags=0)
open a db, or create it if necessary.
Definition: testdb.h:45
virtual void block_txn_start(bool readonly=false)
Definition: testdb.h:58
POD_CLASS hash
Definition: hash.h:49
virtual bool for_all_outputs(std::function< bool(uint64_t amount, const crypto::hash &tx_hash, uint64_t height, size_t tx_idx)> f) const
runs a function over all outputs stored
Definition: testdb.h:115
virtual bool for_all_key_images(std::function< bool(const crypto::key_image &)>) const
runs a function over all key images stored
Definition: testdb.h:112
std::pair< crypto::hash, uint64_t > tx_out_index
Definition: blockchain_db.h:104
virtual void unlock()
This function releases the BlockchainDB lock.
Definition: testdb.h:54
virtual bool remove_data_file(const std::string &folder) const
remove file(s) storing the database
Definition: testdb.h:51
virtual crypto::hash top_block_hash() const
fetch the top block's hash
Definition: testdb.h:82
Definition: cryptonote_basic.h:143
virtual void add_txpool_tx(const cryptonote::transaction &tx, const cryptonote::txpool_tx_meta_t &details)
add a txpool transaction
Definition: testdb.h:121
virtual uint64_t get_indexing_base() const
return index of the first element (should be hidden, but isn't)
Definition: testdb.h:94
virtual cryptonote::tx_out_index get_output_tx_and_index_from_global(const uint64_t &index) const
gets an output's tx hash and index
Definition: testdb.h:96
a struct containing output metadata
Definition: blockchain_db.h:115
Definition: cryptonote_basic.h:182
BaseTestDB()
Definition: testdb.h:44
virtual void update_txpool_tx(const crypto::hash &txid, const cryptonote::txpool_tx_meta_t &details)
update a txpool transaction's metadata
Definition: testdb.h:122
virtual bool is_read_only() const
is BlockchainDB in read-only mode?
Definition: testdb.h:117
virtual size_t get_block_weight(const uint64_t &height) const
fetch a block's weight
Definition: testdb.h:74