mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
add mutex to get_randomx_code
This commit is contained in:
parent
a8c3f4072a
commit
636179ac53
1 changed files with 4 additions and 0 deletions
|
@ -7134,10 +7134,14 @@ get_randomx_code(uint64_t blk_height,
|
|||
block const& blk,
|
||||
crypto::hash const& blk_hash)
|
||||
{
|
||||
static std::mutex mtx;
|
||||
|
||||
vector<std::pair<string, string>> rx_code;
|
||||
|
||||
blobdata bd = get_block_hashing_blob(blk);
|
||||
|
||||
std::lock_guard<std::mutex> lk {mtx};
|
||||
|
||||
if (!rx_vm)
|
||||
{
|
||||
// this will create rx_vm instance if one
|
||||
|
|
Loading…
Reference in a new issue