1
0
Fork 0
forked from lthn/blockchain

extended rpc api for block eplorer etc

This commit is contained in:
crypro.zoidberg 2019-01-17 14:18:05 +03:00
parent 6b963cfbf1
commit 5d5dae7130
2 changed files with 5 additions and 0 deletions

View file

@ -1733,6 +1733,9 @@ bool blockchain_storage::get_main_block_rpc_details(uint64_t i, block_rpc_extend
CRITICAL_REGION_LOCAL(m_read_lock);
auto core_bei_ptr = m_db_blocks[i];
crypto::hash id = get_block_hash(core_bei_ptr->bl);
crypto::hash pow_seed = null_hash;
get_seed_for_scratchpad(i, pow_seed);
bei.pow_seed = epee::string_tools::pod_to_hex(pow_seed);
bei.is_orphan = false;
bei.total_fee = 0;
bei.total_txs_size = 0;

View file

@ -1225,6 +1225,7 @@ namespace currency
std::string cumulative_diff_precise;
std::string difficulty;
std::string prev_id;
std::string pow_seed;
uint64_t type;
bool is_orphan;
uint64_t already_generated_coins;
@ -1249,6 +1250,7 @@ namespace currency
KV_SERIALIZE(penalty)
KV_SERIALIZE(id)
KV_SERIALIZE(prev_id)
KV_SERIALIZE(pow_seed)
KV_SERIALIZE(cumulative_diff_adjusted)
KV_SERIALIZE(cumulative_diff_precise)
KV_SERIALIZE(difficulty)