diff options
author | SChernykh <sergey.v.chernykh@gmail.com> | 2022-12-10 18:30:59 +0100 |
---|---|---|
committer | SChernykh <sergey.v.chernykh@gmail.com> | 2022-12-14 07:21:00 +0100 |
commit | f698f2b708be742afa286c65868a48f7ef80b0ba (patch) | |
tree | a6806569a4d1d0fa3847f55b08cfe4002cff709f /src/rpc | |
parent | Merge pull request #8642 (diff) | |
download | monero-f698f2b708be742afa286c65868a48f7ef80b0ba.tar.xz |
Refactored rx-slow-hash.c
- Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)`
- Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens
- `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance)
- New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification)
- When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then)
- When mining is running, PoW checks now also use dataset for faster verification
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/rpc_payment.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rpc/rpc_payment.cpp b/src/rpc/rpc_payment.cpp index 2e05f04fb..aca3e3761 100644 --- a/src/rpc/rpc_payment.cpp +++ b/src/rpc/rpc_payment.cpp @@ -236,10 +236,8 @@ namespace cryptonote *(uint32_t*)(hashing_blob.data() + 39) = SWAP32LE(nonce); if (block.major_version >= RX_BLOCK_VERSION) { - const uint64_t seed_height = is_current ? info.seed_height : info.previous_seed_height; const crypto::hash &seed_hash = is_current ? info.seed_hash : info.previous_seed_hash; - const uint64_t height = cryptonote::get_block_height(block); - crypto::rx_slow_hash(height, seed_height, seed_hash.data, hashing_blob.data(), hashing_blob.size(), hash.data, 0, 0); + crypto::rx_slow_hash(seed_hash.data, hashing_blob.data(), hashing_blob.size(), hash.data); } else { |