diff --git a/src/page.h b/src/page.h index 89b7c0f..614c2d7 100644 --- a/src/page.h +++ b/src/page.h @@ -7134,10 +7134,14 @@ get_randomx_code(uint64_t blk_height, block const& blk, crypto::hash const& blk_hash) { + static std::mutex mtx; + vector> rx_code; blobdata bd = get_block_hashing_blob(blk); + std::lock_guard lk {mtx}; + if (!rx_vm) { // this will create rx_vm instance if one