Temprorary make it compile with ubuntu 16.04 branch

This commit is contained in:
moneroexamples 2018-09-14 08:38:10 +08:00
parent 5716416c25
commit db964c12c8
6 changed files with 19 additions and 19 deletions

View File

@ -120,6 +120,7 @@ set(LIBRARIES
version
epee
pcsclite
sodium
${Boost_LIBRARIES}
pthread
unbound

View File

@ -137,8 +137,8 @@ CurrentBlockchainStatus::calculate_emission_in_blocks(
uint64_t coinbase_amount = get_outs_money_amount(blk.miner_tx);
std::list<transaction> txs;
std::list<crypto::hash> missed_txs;
std::vector<transaction> txs;
std::vector<crypto::hash> missed_txs;
uint64_t tx_fee_amount = 0;

View File

@ -235,8 +235,8 @@ MicroCore::get_tx_hash_from_output_pubkey(const public_key& output_pubkey,
// get all transactions in the block found
// initialize the first list with transaction for solving
// the block i.e. coinbase.
list<transaction> txs {blk.miner_tx};
list<crypto::hash> missed_txs;
vector<transaction> txs {blk.miner_tx};
vector<crypto::hash> missed_txs;
if (!m_blockchain_storage.get_transactions(blk.tx_hashes, txs, missed_txs))
{

View File

@ -583,7 +583,7 @@ public:
crypto::hash blk_hash = core_storage->get_block_id_by_height(i);
// get block size in kB
double blk_size = static_cast<double>(core_storage->get_db().get_block_size(i))/1024.0;
double blk_size = static_cast<double>(core_storage->get_db().get_block_weight(i))/1024.0;
string blk_size_str = fmt::format("{:0.2f}", blk_size);
@ -716,8 +716,8 @@ public:
// get all transactions in the block found
// initialize the first list with transaction for solving
// the block i.e. coinbase.
list<cryptonote::transaction> blk_txs {blk.miner_tx};
list<crypto::hash> missed_txs;
vector<cryptonote::transaction> blk_txs {blk.miner_tx};
vector<crypto::hash> missed_txs;
if (!core_storage->get_transactions(blk.tx_hashes, blk_txs, missed_txs))
{
@ -1157,7 +1157,7 @@ public:
}
// 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;
@ -4293,7 +4293,7 @@ public:
// 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;
@ -4522,7 +4522,7 @@ public:
}
// 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);
@ -4541,8 +4541,8 @@ public:
json& j_txs = j_blocks.back()["txs"];
list<cryptonote::transaction> blk_txs {blk.miner_tx};
list<crypto::hash> missed_txs;
vector<cryptonote::transaction> blk_txs {blk.miner_tx};
vector<crypto::hash> missed_txs;
if (!core_storage->get_transactions(blk.tx_hashes, blk_txs, missed_txs))
{
@ -5107,8 +5107,8 @@ public:
}
// get transactions in the given block
list <cryptonote::transaction> blk_txs{blk.miner_tx};
list <crypto::hash> missed_txs;
vector <cryptonote::transaction> blk_txs{blk.miner_tx};
vector <crypto::hash> missed_txs;
if (!core_storage->get_transactions(blk.tx_hashes, blk_txs, missed_txs))
{

View File

@ -275,9 +275,9 @@ rpccalls::get_dynamic_per_kb_fee_estimate(
uint64_t& fee,
string& error_msg)
{
epee::json_rpc::request<COMMAND_RPC_GET_PER_KB_FEE_ESTIMATE::request>
epee::json_rpc::request<COMMAND_RPC_GET_BASE_FEE_ESTIMATE::request>
req_t = AUTO_VAL_INIT(req_t);
epee::json_rpc::response<COMMAND_RPC_GET_PER_KB_FEE_ESTIMATE::response, std::string>
epee::json_rpc::response<COMMAND_RPC_GET_BASE_FEE_ESTIMATE::response, std::string>
resp_t = AUTO_VAL_INIT(resp_t);

View File

@ -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,
@ -1048,7 +1047,7 @@ decrypt(const std::string &ciphertext,
}
crypto::chacha_key key;
crypto::generate_chacha_key(&skey, sizeof(skey), key);
crypto::generate_chacha_key(&skey, sizeof(skey), key, 1);
const crypto::chacha_iv &iv = *(const crypto::chacha_iv*)&ciphertext[0];