aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-09-23 22:10:03 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-09-23 22:10:03 -0500
commit298c9a357f6e57eccf28db1f3e734eb6da080d9a (patch)
treecece5d9e4c744a8c115c255b89cc3ff0c4d9b0ef /src/cryptonote_core/cryptonote_core.cpp
parent237acd120e0da39913bd7b195e2309eff06d639e (diff)
parentdfee15eee18a97be5a8fb9822527f98ebd1b33e9 (diff)
downloadmonzero-core-298c9a357f6e57eccf28db1f3e734eb6da080d9a.tar.gz
monzero-core-298c9a357f6e57eccf28db1f3e734eb6da080d9a.tar.xz
monzero-core-298c9a357f6e57eccf28db1f3e734eb6da080d9a.zip
Merge pull request #7891
dfee15e RPC and ZeroMQ APIs to support p2pool (SChernykh)
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index ed9f7a28c..4c6536318 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -1065,8 +1065,9 @@ namespace cryptonote
if (already_have[i])
continue;
- const uint64_t weight = results[i].tx.pruned ? get_pruned_transaction_weight(results[i].tx) : get_transaction_weight(results[i].tx, it->blob.size());
- ok &= add_new_tx(results[i].tx, results[i].hash, tx_blobs[i].blob, weight, tvc[i], tx_relay, relayed);
+ results[i].blob_size = it->blob.size();
+ results[i].weight = results[i].tx.pruned ? get_pruned_transaction_weight(results[i].tx) : get_transaction_weight(results[i].tx, it->blob.size());
+ ok &= add_new_tx(results[i].tx, results[i].hash, tx_blobs[i].blob, results[i].weight, tvc[i], tx_relay, relayed);
if(tvc[i].m_verifivation_failed)
{MERROR_VER("Transaction verification failed: " << results[i].hash);}
@@ -1405,6 +1406,11 @@ namespace cryptonote
return m_blockchain_storage.create_block_template(b, prev_block, adr, diffic, height, expected_reward, ex_nonce, seed_height, seed_hash);
}
//-----------------------------------------------------------------------------------------------
+ bool core::get_miner_data(uint8_t& major_version, uint64_t& height, crypto::hash& prev_id, crypto::hash& seed_hash, difficulty_type& difficulty, uint64_t& median_weight, uint64_t& already_generated_coins, std::vector<tx_block_template_backlog_entry>& tx_backlog)
+ {
+ return m_blockchain_storage.get_miner_data(major_version, height, prev_id, seed_hash, difficulty, median_weight, already_generated_coins, tx_backlog);
+ }
+ //-----------------------------------------------------------------------------------------------
bool core::find_blockchain_supplement(const std::list<crypto::hash>& qblock_ids, bool clip_pruned, NOTIFY_RESPONSE_CHAIN_ENTRY::request& resp) const
{
return m_blockchain_storage.find_blockchain_supplement(qblock_ids, clip_pruned, resp);