mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
get_alt_blocks modified
This commit is contained in:
parent
ba6f5b81f0
commit
90638a25ac
3 changed files with 11 additions and 11 deletions
10
src/page.h
10
src/page.h
|
@ -425,15 +425,15 @@ namespace xmreg
|
||||||
{"show_cache_times" , show_cache_times}
|
{"show_cache_times" , show_cache_times}
|
||||||
};
|
};
|
||||||
|
|
||||||
vector<block_complete_entry> atl_blks;
|
vector<string> atl_blks_hashes;
|
||||||
|
|
||||||
rpc.get_alt_blocks(atl_blks);
|
rpc.get_alt_blocks(atl_blks_hashes);
|
||||||
|
|
||||||
cout << "atl_blks.size(): " << atl_blks.size() << endl;
|
cout << "atl_blks_hashes.size(): " << atl_blks_hashes.size() << endl;
|
||||||
|
|
||||||
for (const block_complete_entry& alt_blk: atl_blks)
|
for (const string& alt_blk_hash: atl_blks_hashes)
|
||||||
{
|
{
|
||||||
cout << "alt_blk tx: " << alt_blk.txs.size() << endl;
|
cout << "alt_blk_hash: " << alt_blk_hash << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
context.emplace("txs", mstch::array()); // will keep tx to show
|
context.emplace("txs", mstch::array()); // will keep tx to show
|
||||||
|
|
|
@ -209,12 +209,12 @@ rpccalls::get_network_info(COMMAND_RPC_GET_INFO::response& response)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
rpccalls::get_alt_blocks(vector<block_complete_entry>& alt_blocks)
|
rpccalls::get_alt_blocks(vector<string>& alt_blocks_hashes)
|
||||||
{
|
{
|
||||||
bool r {false};
|
bool r {false};
|
||||||
|
|
||||||
COMMAND_RPC_GET_ALT_BLOCKS::request req;
|
COMMAND_RPC_GET_ALT_BLOCKS_HASHES::request req;
|
||||||
COMMAND_RPC_GET_ALT_BLOCKS::response resp;
|
COMMAND_RPC_GET_ALT_BLOCKS_HASHES::response resp;
|
||||||
|
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> guard(m_daemon_rpc_mutex);
|
std::lock_guard<std::mutex> guard(m_daemon_rpc_mutex);
|
||||||
|
@ -225,7 +225,7 @@ rpccalls::get_alt_blocks(vector<block_complete_entry>& alt_blocks)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = epee::net_utils::invoke_http_bin("/getaltblocks.bin",
|
r = epee::net_utils::invoke_http_json("/get_alt_blocks_hashes",
|
||||||
req, resp,
|
req, resp,
|
||||||
m_http_client);
|
m_http_client);
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ rpccalls::get_alt_blocks(vector<block_complete_entry>& alt_blocks)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
alt_blocks = resp.blocks;
|
alt_blocks_hashes = resp.blks_hashes;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
get_network_info(COMMAND_RPC_GET_INFO::response& info);
|
get_network_info(COMMAND_RPC_GET_INFO::response& info);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
get_alt_blocks(vector<block_complete_entry>& alt_blocks);
|
get_alt_blocks(vector<string>& alt_blocks_hashes);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
get_dynamic_per_kb_fee_estimate(
|
get_dynamic_per_kb_fee_estimate(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue