Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115146
D17716.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D17716.diff
View Options
diff --git a/src/avalanche/peermanager.cpp b/src/avalanche/peermanager.cpp
--- a/src/avalanche/peermanager.cpp
+++ b/src/avalanche/peermanager.cpp
@@ -12,6 +12,7 @@
#include <cashaddrenc.h>
#include <common/args.h>
#include <consensus/activation.h>
+#include <core_io.h>
#include <logging.h>
#include <random.h>
#include <scheduler.h>
@@ -1000,6 +1001,13 @@
return false;
}
+ std::optional<std::string> maybeArg = gArgs.GetArg("-avastakingwinner");
+ if (!maybeArg) {
+ return false;
+ }
+ winners.push_back({ProofId(), ParseScript(maybeArg.value())});
+ return true;
+
// Don't select proofs that have not been known for long enough, i.e. at
// least since twice the dangling proof cleanup timeout before the last
// block time, so we're sure to not account for proofs more recent than the
diff --git a/src/init.cpp b/src/init.cpp
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1395,6 +1395,9 @@
strprintf("Enable the avalanche feature (default: %u)",
AVALANCHE_DEFAULT_ENABLED),
ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE);
+ argsman.AddArg("-avastakingwinner",
+ "Override staking rewards payout script",
+ ArgsManager::ALLOW_ANY, OptionsCategory::AVALANCHE);
argsman.AddArg(
"-avalanchestakingrewards",
strprintf("Enable the avalanche staking rewards feature (default: %u, "
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 09:58 (7 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5184720
Default Alt Text
D17716.diff (1 KB)
Attached To
D17716: [TESTNET ONLY] Override staking rewards using config
Event Timeline
Log In to Comment