diff options
Diffstat (limited to 'src/blockchain_db')
-rw-r--r-- | src/blockchain_db/berkeleydb/db_bdb.cpp | 2 | ||||
-rw-r--r-- | src/blockchain_db/berkeleydb/db_bdb.h | 2 | ||||
-rw-r--r-- | src/blockchain_db/blockchain_db.h | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/blockchain_db/berkeleydb/db_bdb.cpp b/src/blockchain_db/berkeleydb/db_bdb.cpp index da68ff40c..486b63a3e 100644 --- a/src/blockchain_db/berkeleydb/db_bdb.cpp +++ b/src/blockchain_db/berkeleydb/db_bdb.cpp @@ -588,7 +588,7 @@ bool BlockchainBDB::for_all_blocks(std::function<bool(uint64_t, const crypto::ha bdb_cur cur(DB_DEFAULT_TX, m_blocks); - Dbt_copy<uint64_t> k; + Dbt_copy<uint32_t> k; Dbt_safe v; bool ret = true; int result; diff --git a/src/blockchain_db/berkeleydb/db_bdb.h b/src/blockchain_db/berkeleydb/db_bdb.h index 6bc9cb4f1..d05abea25 100644 --- a/src/blockchain_db/berkeleydb/db_bdb.h +++ b/src/blockchain_db/berkeleydb/db_bdb.h @@ -297,6 +297,8 @@ public: virtual uint64_t get_num_outputs(const uint64_t& amount) const; + virtual uint64_t get_indexing_base() const { return 1; } + virtual output_data_t get_output_key(const uint64_t& amount, const uint64_t& index); virtual output_data_t get_output_key(const uint64_t& global_index) const; virtual void get_output_key(const uint64_t &amount, const std::vector<uint64_t> &offsets, std::vector<output_data_t> &outputs); diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 85144f04c..152f29b38 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -464,6 +464,9 @@ public: // returns the total number of outputs of amount <amount> virtual uint64_t get_num_outputs(const uint64_t& amount) const = 0; + // return index of the first element (should be hidden, but isn't) + virtual uint64_t get_indexing_base() const { return 0; } + // return public key for output with global output amount <amount> and index <index> virtual output_data_t get_output_key(const uint64_t& amount, const uint64_t& index) = 0; virtual output_data_t get_output_key(const uint64_t& global_index) const = 0; |