aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_db')
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.cpp2
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.h2
-rw-r--r--src/blockchain_db/blockchain_db.cpp2
-rw-r--r--src/blockchain_db/blockchain_db.h2
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp6
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.h6
6 files changed, 10 insertions, 10 deletions
diff --git a/src/blockchain_db/berkeleydb/db_bdb.cpp b/src/blockchain_db/berkeleydb/db_bdb.cpp
index 4b254500b..221c0cf2e 100644
--- a/src/blockchain_db/berkeleydb/db_bdb.cpp
+++ b/src/blockchain_db/berkeleydb/db_bdb.cpp
@@ -502,7 +502,7 @@ void BlockchainBDB::remove_spent_key(const crypto::key_image& k_image)
throw1(DB_ERROR("Error adding removal of key image to db transaction"));
}
-blobdata BlockchainBDB::output_to_blob(const tx_out& output)
+blobdata BlockchainBDB::output_to_blob(const tx_out& output) const
{
LOG_PRINT_L3("BlockchainBDB::" << __func__);
blobdata b;
diff --git a/src/blockchain_db/berkeleydb/db_bdb.h b/src/blockchain_db/berkeleydb/db_bdb.h
index d4eb5434c..83588b031 100644
--- a/src/blockchain_db/berkeleydb/db_bdb.h
+++ b/src/blockchain_db/berkeleydb/db_bdb.h
@@ -232,7 +232,7 @@ private:
*
* @return the resultant blob
*/
- blobdata output_to_blob(const tx_out& output);
+ blobdata output_to_blob(const tx_out& output) const;
/**
* @brief convert a tx output blob to a tx output
diff --git a/src/blockchain_db/blockchain_db.cpp b/src/blockchain_db/blockchain_db.cpp
index d648be44e..bfe93948a 100644
--- a/src/blockchain_db/blockchain_db.cpp
+++ b/src/blockchain_db/blockchain_db.cpp
@@ -129,7 +129,7 @@ void BlockchainDB::pop_block(block& blk, std::vector<transaction>& txs)
}
}
-bool BlockchainDB::is_open()
+bool BlockchainDB::is_open() const
{
return m_open;
}
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h
index 04d9c5384..46c860122 100644
--- a/src/blockchain_db/blockchain_db.h
+++ b/src/blockchain_db/blockchain_db.h
@@ -330,7 +330,7 @@ public:
virtual void open(const std::string& filename, const int db_flags = 0) = 0;
// returns true of the db is open/ready, else false
- bool is_open();
+ bool is_open() const;
// close and sync the db
virtual void close() = 0;
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 80cb5724e..0ed044954 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -211,7 +211,7 @@ void mdb_txn_safe::abort()
}
}
-uint64_t mdb_txn_safe::num_active_tx()
+uint64_t mdb_txn_safe::num_active_tx() const
{
return num_active_txns;
}
@@ -272,7 +272,7 @@ void BlockchainLMDB::do_resize()
mdb_txn_safe::allow_new_txns();
}
-bool BlockchainLMDB::need_resize()
+bool BlockchainLMDB::need_resize() const
{
MDB_envinfo mei;
@@ -687,7 +687,7 @@ void BlockchainLMDB::remove_spent_key(const crypto::key_image& k_image)
throw1(DB_ERROR("Error adding removal of key image to db transaction"));
}
-blobdata BlockchainLMDB::output_to_blob(const tx_out& output)
+blobdata BlockchainLMDB::output_to_blob(const tx_out& output) const
{
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
blobdata b;
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h
index ec552a0f6..6a2646816 100644
--- a/src/blockchain_db/lmdb/db_lmdb.h
+++ b/src/blockchain_db/lmdb/db_lmdb.h
@@ -59,7 +59,7 @@ struct mdb_txn_safe
return &m_txn;
}
- uint64_t num_active_tx();
+ uint64_t num_active_tx() const;
static void prevent_new_txns();
static void wait_no_active_txns();
@@ -201,7 +201,7 @@ public:
private:
void do_resize();
- bool need_resize();
+ bool need_resize() const;
virtual void add_block( const block& blk
, const size_t& block_size
@@ -236,7 +236,7 @@ private:
*
* @return the resultant blob
*/
- blobdata output_to_blob(const tx_out& output);
+ blobdata output_to_blob(const tx_out& output) const;
/**
* @brief convert a tx output blob to a tx output