aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/berkeleydb
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-18 22:24:53 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-11 13:38:07 +0000
commit5ffb2ff9b7c301eda5811a939c705f26627c4735 (patch)
treeac1ed0c55f69db9e65ebca9567bf3013e55c3bb6 /src/blockchain_db/berkeleydb
parentbulletproofs: a few fixes from the Kudelski review (diff)
downloadmonero-5ffb2ff9b7c301eda5811a939c705f26627c4735.tar.xz
v8: per byte fee, pad bulletproofs, fixed 11 ring size
Diffstat (limited to 'src/blockchain_db/berkeleydb')
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.cpp10
-rw-r--r--src/blockchain_db/berkeleydb/db_bdb.h6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/blockchain_db/berkeleydb/db_bdb.cpp b/src/blockchain_db/berkeleydb/db_bdb.cpp
index f827ab7c3..6c79120e8 100644
--- a/src/blockchain_db/berkeleydb/db_bdb.cpp
+++ b/src/blockchain_db/berkeleydb/db_bdb.cpp
@@ -224,7 +224,7 @@ struct Dbt_safe : public Dbt
namespace cryptonote
{
-void BlockchainBDB::add_block(const block& blk, const size_t& block_size, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const crypto::hash& blk_hash)
+void BlockchainBDB::add_block(const block& blk, size_t block_weight, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const crypto::hash& blk_hash)
{
LOG_PRINT_L3("BlockchainBDB::" << __func__);
check_open();
@@ -255,7 +255,7 @@ void BlockchainBDB::add_block(const block& blk, const size_t& block_size, const
if (res)
throw0(DB_ERROR("Failed to add block blob to db transaction."));
- Dbt_copy<size_t> sz(block_size);
+ Dbt_copy<size_t> sz(block_weight);
if (m_block_sizes->put(DB_DEFAULT_TX, &key, &sz, 0))
throw0(DB_ERROR("Failed to add block size to db transaction."));
@@ -1353,7 +1353,7 @@ uint64_t BlockchainBDB::get_top_block_timestamp() const
return get_block_timestamp(m_height - 1);
}
-size_t BlockchainBDB::get_block_size(const uint64_t& height) const
+size_t BlockchainBDB::get_block_weight(const uint64_t& height) const
{
LOG_PRINT_L3("BlockchainBDB::" << __func__);
check_open();
@@ -1861,7 +1861,7 @@ void BlockchainBDB::block_txn_abort()
// TODO
}
-uint64_t BlockchainBDB::add_block(const block& blk, const size_t& block_size, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const std::vector<transaction>& txs)
+uint64_t BlockchainBDB::add_block(const block& blk, size_t block_weight, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated, const std::vector<transaction>& txs)
{
LOG_PRINT_L3("BlockchainBDB::" << __func__);
check_open();
@@ -1874,7 +1874,7 @@ uint64_t BlockchainBDB::add_block(const block& blk, const size_t& block_size, co
uint64_t num_outputs = m_num_outputs;
try
{
- BlockchainDB::add_block(blk, block_size, cumulative_difficulty, coins_generated, txs);
+ BlockchainDB::add_block(blk, block_weight, cumulative_difficulty, coins_generated, txs);
m_write_txn = NULL;
TIME_MEASURE_START(time1);
diff --git a/src/blockchain_db/berkeleydb/db_bdb.h b/src/blockchain_db/berkeleydb/db_bdb.h
index 8c99ab255..76d0a0517 100644
--- a/src/blockchain_db/berkeleydb/db_bdb.h
+++ b/src/blockchain_db/berkeleydb/db_bdb.h
@@ -266,7 +266,7 @@ public:
virtual uint64_t get_top_block_timestamp() const;
- virtual size_t get_block_size(const uint64_t& height) const;
+ virtual size_t get_block_weight(const uint64_t& height) const;
virtual difficulty_type get_block_cumulative_difficulty(const uint64_t& height) const;
@@ -318,7 +318,7 @@ public:
virtual bool has_key_image(const crypto::key_image& img) const;
virtual uint64_t add_block( const block& blk
- , const size_t& block_size
+ , size_t block_weight
, const difficulty_type& cumulative_difficulty
, const uint64_t& coins_generated
, const std::vector<transaction>& txs
@@ -353,7 +353,7 @@ public:
private:
virtual void add_block( const block& blk
- , const size_t& block_size
+ , size_t block_weight
, const difficulty_type& cumulative_difficulty
, const uint64_t& coins_generated
, const crypto::hash& block_hash