Skip to content

Commit 5b79957

Browse files
authored
Merge pull request #116 from XMRig-for-Android/xmrig
Update xmrig.patch
2 parents ff99219 + aea6461 commit 5b79957

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

xmrig/lib-builder/xmrig.patch

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- build/src/xmrig/src/net/strategies/DonateStrategy.cpp 2022-02-15 15:25:55.000000000 +0200
2-
+++ build/src/xmrig-1/src/net/strategies/DonateStrategy.cpp 2022-02-15 15:26:24.000000000 +0200
1+
--- build/src/xmrig/src/net/strategies/DonateStrategy.cpp 2022-02-15 16:16:19.000000000 +0200
2+
+++ build/src/xmrig-1/src/net/strategies/DonateStrategy.cpp 2022-02-15 16:18:20.000000000 +0200
33
@@ -19,6 +19,8 @@
44
#include <algorithm>
55
#include <cassert>
@@ -9,7 +9,7 @@
99

1010

1111
#include "net/strategies/DonateStrategy.h"
12-
@@ -42,18 +44,34 @@
12+
@@ -42,15 +44,31 @@
1313

1414
static inline double randomf(double min, double max) { return (max - min) * (((static_cast<double>(rand())) / static_cast<double>(RAND_MAX))) + min; }
1515
static inline uint64_t random(uint64_t base, double min, double max) { return static_cast<uint64_t>(base * randomf(min, max)); }
@@ -42,13 +42,8 @@
4242

4343
-
4444
xmrig::DonateStrategy::DonateStrategy(Controller *controller, IStrategyListener *listener) :
45-
- m_donateTime(static_cast<uint64_t>(controller->config()->pools().donateLevel()) * 60 * 1000),
46-
- m_idleTime((100 - static_cast<uint64_t>(controller->config()->pools().donateLevel())) * 60 * 1000),
47-
+ m_donateTime(99 * 60 * 1000),
48-
+ m_idleTime(1 * 60 * 1000),
49-
m_controller(controller),
50-
m_listener(listener)
51-
{
45+
m_donateTime(static_cast<uint64_t>(controller->config()->pools().donateLevel()) * 60 * 1000),
46+
m_idleTime((100 - static_cast<uint64_t>(controller->config()->pools().donateLevel())) * 60 * 1000),
5247
@@ -70,9 +88,9 @@
5348
# endif
5449

0 commit comments

Comments
 (0)