From 78b6fa32ab1d8013e4625232fe38f505d571f387 Mon Sep 17 00:00:00 2001 From: stoffu Date: Wed, 12 Sep 2018 08:49:06 +0900 Subject: [PATCH] support for the new Bulletproofs format --- src/page.h | 8 ++++---- src/rpccalls.cpp | 4 ++-- src/tools.cpp | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/page.h b/src/page.h index 61d1513..ada33a8 100644 --- a/src/page.h +++ b/src/page.h @@ -653,7 +653,7 @@ index2(uint64_t page_no = 0, bool refresh_page = false) crypto::hash blk_hash = core_storage->get_block_id_by_height(i); // get block size in kB - double blk_size = static_cast(core_storage->get_db().get_block_size(i))/1024.0; + double blk_size = static_cast(core_storage->get_db().get_block_weight(i))/1024.0; string blk_size_str = fmt::format("{:0.2f}", blk_size); @@ -1225,7 +1225,7 @@ show_block(uint64_t _blk_height) } // get block size in bytes - uint64_t blk_size = core_storage->get_db().get_block_size(_blk_height); + uint64_t blk_size = core_storage->get_db().get_block_weight(_blk_height); // miner reward tx transaction coinbase_tx = blk.miner_tx; @@ -4610,7 +4610,7 @@ json_block(string block_no_or_hash) // get block size in bytes - uint64_t blk_size = core_storage->get_db().get_block_size(block_height); + uint64_t blk_size = core_storage->get_db().get_block_weight(block_height); // miner reward tx transaction coinbase_tx = blk.miner_tx; @@ -4839,7 +4839,7 @@ json_transactions(string _page, string _limit) } // get block size in bytes - double blk_size = core_storage->get_db().get_block_size(i); + double blk_size = core_storage->get_db().get_block_weight(i); crypto::hash blk_hash = core_storage->get_block_id_by_height(i); diff --git a/src/rpccalls.cpp b/src/rpccalls.cpp index d9711be..c5ec95f 100644 --- a/src/rpccalls.cpp +++ b/src/rpccalls.cpp @@ -275,9 +275,9 @@ rpccalls::get_dynamic_per_kb_fee_estimate( uint64_t& fee, string& error_msg) { - epee::json_rpc::request + epee::json_rpc::request req_t = AUTO_VAL_INIT(req_t); - epee::json_rpc::response + epee::json_rpc::response resp_t = AUTO_VAL_INIT(resp_t); diff --git a/src/tools.cpp b/src/tools.cpp index 2c8300a..e7d3025 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -935,7 +935,7 @@ decode_ringct(rct::rctSig const& rv, switch (rv.type) { case rct::RCTTypeSimple: - case rct::RCTTypeSimpleBulletproof: + case rct::RCTTypeBulletproof: amount = rct::decodeRctSimple(rv, rct::sk2rct(scalar1), i, @@ -943,7 +943,6 @@ decode_ringct(rct::rctSig const& rv, hw::get_device("default")); break; case rct::RCTTypeFull: - case rct::RCTTypeFullBulletproof: amount = rct::decodeRct(rv, rct::sk2rct(scalar1), i,