diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 7 | ||||
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 11 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index a23d51126..42279184a 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -953,6 +953,7 @@ bool Blockchain::prevalidate_miner_transaction(const block& b, uint64_t height) LOG_PRINT_RED_L1("The miner transaction in block has invalid height: " << boost::get<txin_gen>(b.miner_tx.vin[0]).height << ", expected: " << height); return false; } + LOG_PRINT_L1("Miner tx hash: " << get_transaction_hash(b.miner_tx)); CHECK_AND_ASSERT_MES(b.miner_tx.unlock_time == height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW, false, "coinbase transaction transaction has the wrong unlock time=" << b.miner_tx.unlock_time << ", expected " << height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW); //check outs overflow @@ -2195,8 +2196,10 @@ bool Blockchain::check_tx_inputs(transaction& tx, uint64_t& max_used_block_heigh bool res = check_tx_inputs(tx, tvc, &max_used_block_height); TIME_MEASURE_FINISH(a); if(m_show_time_stats) - LOG_PRINT_L0("HASH: " << "+" << " VIN/VOUT: " << tx.vin.size() << "/" << tx.vout.size() << " H: " << max_used_block_height << " chcktx: " << a + m_fake_scan_time); - + { + size_t mix = tx.vin[0].type() == typeid(txin_to_key) ? boost::get<txin_to_key>(tx.vin[0]).key_offsets.size() : 0; + LOG_PRINT_L0("HASH: " << get_transaction_hash(tx) << " VIN/MIX/VOUT: " << tx.vin.size() << "/" << mix << "/" << tx.vout.size() << " H: " << max_used_block_height << " ms: " << a + m_fake_scan_time); + } if (!res) return false; diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 3ddda9efb..4010d3d44 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -619,17 +619,16 @@ namespace cryptonote std::pair<uint64_t, uint64_t> core::get_coinbase_tx_sum(const uint64_t start_offset, const size_t count) { std::list<block> blocks; - std::list<transaction> txs; - std::list<crypto::hash> missed_txs; - uint64_t coinbase_amount = 0; uint64_t emission_amount = 0; uint64_t total_fee_amount = 0; - uint64_t tx_fee_amount = 0; this->get_blocks(start_offset, count, blocks); BOOST_FOREACH(auto& b, blocks) { - coinbase_amount = get_outs_money_amount(b.miner_tx); + std::list<transaction> txs; + std::list<crypto::hash> missed_txs; + uint64_t coinbase_amount = get_outs_money_amount(b.miner_tx); this->get_transactions(b.tx_hashes, txs, missed_txs); + uint64_t tx_fee_amount = 0; BOOST_FOREACH(const auto& tx, txs) { tx_fee_amount += get_tx_fee(tx); @@ -637,8 +636,6 @@ namespace cryptonote emission_amount += coinbase_amount - tx_fee_amount; total_fee_amount += tx_fee_amount; - coinbase_amount = 0; - tx_fee_amount = 0; } return std::pair<uint64_t, uint64_t>(emission_amount, total_fee_amount); |