add mutex to get_randomx_code
This commit is contained in:
parent
a8c3f4072a
commit
636179ac53
|
@ -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 New Issue