mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-10 17:12:46 -05:00
Compare commits
3 Commits
5e3402601c
...
99de780d42
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99de780d42 | ||
|
|
07e1e77c4f | ||
|
|
8f507b7d09 |
@@ -20,7 +20,7 @@ set(SOURCES_BACKEND_COMMON
|
|||||||
src/backend/common/Workers.cpp
|
src/backend/common/Workers.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WITH_RANDOMX AND WITH_BENCHMARK)
|
if (WITH_BENCHMARK AND (WITH_RANDOMX OR WITH_GHOSTRIDER))
|
||||||
list(APPEND HEADERS_BACKEND_COMMON
|
list(APPEND HEADERS_BACKEND_COMMON
|
||||||
src/backend/common/benchmark/Benchmark.h
|
src/backend/common/benchmark/Benchmark.h
|
||||||
src/backend/common/benchmark/BenchState_test.h
|
src/backend/common/benchmark/BenchState_test.h
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ if (WITH_KAWPOW OR WITH_GHOSTRIDER)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (WITH_RANDOMX AND WITH_BENCHMARK)
|
if (WITH_BENCHMARK AND (WITH_RANDOMX OR WITH_GHOSTRIDER))
|
||||||
add_definitions(/DXMRIG_FEATURE_BENCHMARK)
|
add_definitions(/DXMRIG_FEATURE_BENCHMARK)
|
||||||
|
|
||||||
list(APPEND HEADERS_BASE
|
list(APPEND HEADERS_BASE
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2012-2013 The Cryptonote developers
|
* Copyright (c) 2012-2013 The Cryptonote developers
|
||||||
* Copyright (c) 2014-2021 The Monero Project
|
* Copyright (c) 2014-2021 The Monero Project
|
||||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -207,8 +207,11 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||||||
setOffset(MINER_TX_PREFIX_OFFSET, ar.index());
|
setOffset(MINER_TX_PREFIX_OFFSET, ar.index());
|
||||||
|
|
||||||
ar(m_txVersion);
|
ar(m_txVersion);
|
||||||
if (m_coin != Coin::TOWNFORGE)
|
|
||||||
|
if (m_coin != Coin::TOWNFORGE) {
|
||||||
ar(m_unlockTime);
|
ar(m_unlockTime);
|
||||||
|
}
|
||||||
|
|
||||||
ar(m_numInputs);
|
ar(m_numInputs);
|
||||||
|
|
||||||
// must be 1 input
|
// must be 1 input
|
||||||
@@ -281,8 +284,9 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||||||
ar(m_viewTag);
|
ar(m_viewTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_coin == Coin::TOWNFORGE)
|
if (m_coin == Coin::TOWNFORGE) {
|
||||||
ar(m_unlockTime);
|
ar(m_unlockTime);
|
||||||
|
}
|
||||||
|
|
||||||
ar(m_extraSize);
|
ar(m_extraSize);
|
||||||
|
|
||||||
@@ -340,8 +344,9 @@ bool xmrig::BlockTemplate::parse(bool hashes)
|
|||||||
ar(vin_rct_type);
|
ar(vin_rct_type);
|
||||||
|
|
||||||
// no way I'm parsing a full game update here
|
// no way I'm parsing a full game update here
|
||||||
if (m_coin == Coin::TOWNFORGE && m_height % 720 == 0)
|
if (m_coin == Coin::TOWNFORGE && m_height % 720 == 0) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// must be RCTTypeNull (0)
|
// must be RCTTypeNull (0)
|
||||||
if (vin_rct_type != 0) {
|
if (vin_rct_type != 0) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2012-2013 The Cryptonote developers
|
* Copyright (c) 2012-2013 The Cryptonote developers
|
||||||
* Copyright (c) 2014-2021 The Monero Project
|
* Copyright (c) 2014-2021 The Monero Project
|
||||||
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2023 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2023 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -34,8 +34,7 @@
|
|||||||
bool xmrig::WalletAddress::decode(const char *address, size_t size)
|
bool xmrig::WalletAddress::decode(const char *address, size_t size)
|
||||||
{
|
{
|
||||||
uint64_t tf_tag = 0;
|
uint64_t tf_tag = 0;
|
||||||
if (size >= 4 && !strncmp(address, "TF", 2))
|
if (size >= 4 && !strncmp(address, "TF", 2)) {
|
||||||
{
|
|
||||||
tf_tag = 0x424200;
|
tf_tag = 0x424200;
|
||||||
switch (address[2])
|
switch (address[2])
|
||||||
{
|
{
|
||||||
@@ -134,8 +133,9 @@ bool xmrig::WalletAddress::decode(const char *address, size_t size)
|
|||||||
if (memcmp(m_checksum, md, sizeof(m_checksum)) == 0) {
|
if (memcmp(m_checksum, md, sizeof(m_checksum)) == 0) {
|
||||||
m_data = { address, size };
|
m_data = { address, size };
|
||||||
|
|
||||||
if (tf_tag)
|
if (tf_tag) {
|
||||||
m_tag = tf_tag;
|
m_tag = tf_tag;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,8 +333,8 @@ void benchmark()
|
|||||||
|
|
||||||
const CnHash::AlgoVariant* av = Cpu::info()->hasAES() ? av_hw_aes : av_soft_aes;
|
const CnHash::AlgoVariant* av = Cpu::info()->hasAES() ? av_hw_aes : av_soft_aes;
|
||||||
|
|
||||||
uint8_t buf[80];
|
uint8_t buf[80] = { 0 };
|
||||||
uint8_t hash[32 * 8];
|
uint8_t hash[32 * 8] = { 0 };
|
||||||
|
|
||||||
LOG_VERBOSE("%24s | N | Hashrate", "Algorithm");
|
LOG_VERBOSE("%24s | N | Hashrate", "Algorithm");
|
||||||
LOG_VERBOSE("-------------------------|-----|-------------");
|
LOG_VERBOSE("-------------------------|-----|-------------");
|
||||||
@@ -540,10 +540,13 @@ HelperThread* create_helper_thread(int64_t cpu_index, int priority, const std::v
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (hwloc_bitmap_weight(helper_cpu_set) > 0) {
|
if (hwloc_bitmap_weight(helper_cpu_set) > 0) {
|
||||||
|
hwloc_bitmap_free(main_threads_set);
|
||||||
return new HelperThread(helper_cpu_set, priority, is8MB);
|
return new HelperThread(helper_cpu_set, priority, is8MB);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
hwloc_bitmap_free(helper_cpu_set);
|
||||||
|
hwloc_bitmap_free(main_threads_set);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user