aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-12-05 19:20:19 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-12-05 21:13:13 +0000
commit6644b9b7b72919f43d05585a4c2590cec8a7beda (patch)
treef1a2967b1236e1d18f1f4a2fa4b6650ae08c2b33
parentMerge pull request #4878 (diff)
downloadmonero-6644b9b7b72919f43d05585a4c2590cec8a7beda.tar.xz
blockchain_db: remove a couple unused functions
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.cpp23
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.h18
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp23
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.h18
4 files changed, 0 insertions, 82 deletions
diff --git a/src/blockchain_db/berkeleydb/db_bdb.cpp b/src/blockchain_db/berkeleydb/db_bdb.cpp
index 6c79120e8..b27a00a69 100644
--- a/src/blockchain_db/berkeleydb/db_bdb.cpp
+++ b/src/blockchain_db/berkeleydb/db_bdb.cpp
@@ -714,29 +714,6 @@ bool BlockchainBDB::for_all_outputs(std::function<bool(uint64_t amount, const cr
return ret;
}
-blobdata BlockchainBDB::output_to_blob(const tx_out& output) const
-{
- LOG_PRINT_L3("BlockchainBDB::" << __func__);
- blobdata b;
- if (!t_serializable_object_to_blob(output, b))
- throw1(DB_ERROR("Error serializing output to blob"));
- return b;
-}
-
-tx_out BlockchainBDB::output_from_blob(const blobdata& blob) const
-{
- LOG_PRINT_L3("BlockchainBDB::" << __func__);
- std::stringstream ss;
- ss << blob;
- binary_archive<false> ba(ss);
- tx_out o;
-
- if (!(::serialization::serialize(ba, o)))
- throw1(DB_ERROR("Error deserializing tx output blob"));
-
- return o;
-}
-
uint64_t BlockchainBDB::get_output_global_index(const uint64_t& amount, const uint64_t& index)
{
LOG_PRINT_L3("BlockchainBDB::" << __func__);
diff --git a/src/blockchain_db/berkeleydb/db_bdb.h b/src/blockchain_db/berkeleydb/db_bdb.h
index 76d0a0517..e80adae9e 100644
--- a/src/blockchain_db/berkeleydb/db_bdb.h
+++ b/src/blockchain_db/berkeleydb/db_bdb.h
@@ -392,24 +392,6 @@ private:
virtual void drop_hard_fork_info();
/**
- * @brief convert a tx output to a blob for storage
- *
- * @param output the output to convert
- *
- * @return the resultant blob
- */
- blobdata output_to_blob(const tx_out& output) const;
-
- /**
- * @brief convert a tx output blob to a tx output
- *
- * @param blob the blob to convert
- *
- * @return the resultant tx output
- */
- tx_out output_from_blob(const blobdata& blob) const;
-
- /**
* @brief get the global index of the index-th output of the given amount
*
* @param amount the output amount
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 5af5d1903..125eff88f 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -1112,29 +1112,6 @@ void BlockchainLMDB::remove_spent_key(const crypto::key_image& k_image)
}
}
-blobdata BlockchainLMDB::output_to_blob(const tx_out& output) const
-{
- LOG_PRINT_L3("BlockchainLMDB::" << __func__);
- blobdata b;
- if (!t_serializable_object_to_blob(output, b))
- throw1(DB_ERROR("Error serializing output to blob"));
- return b;
-}
-
-tx_out BlockchainLMDB::output_from_blob(const blobdata& blob) const
-{
- LOG_PRINT_L3("BlockchainLMDB::" << __func__);
- std::stringstream ss;
- ss << blob;
- binary_archive<false> ba(ss);
- tx_out o;
-
- if (!(::serialization::serialize(ba, o)))
- throw1(DB_ERROR("Error deserializing tx output blob"));
-
- return o;
-}
-
void BlockchainLMDB::check_open() const
{
// LOG_PRINT_L3("BlockchainLMDB::" << __func__);
diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h
index 26159ab4d..12261dca3 100644
--- a/src/blockchain_db/lmdb/db_lmdb.h
+++ b/src/blockchain_db/lmdb/db_lmdb.h
@@ -357,24 +357,6 @@ private:
virtual void check_hard_fork_info();
virtual void drop_hard_fork_info();
- /**
- * @brief convert a tx output to a blob for storage
- *
- * @param output the output to convert
- *
- * @return the resultant blob
- */
- blobdata output_to_blob(const tx_out& output) const;
-
- /**
- * @brief convert a tx output blob to a tx output
- *
- * @param blob the blob to convert
- *
- * @return the resultant tx output
- */
- tx_out output_from_blob(const blobdata& blob) const;
-
void check_open() const;
virtual bool is_read_only() const;