Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • crown-core crown-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 75
    • Issues 75
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Crown
  • crown-corecrown-core
  • Merge requests
  • !178

Closed
Created Mar 02, 2019 by Mark Brooker@walkjiveflyMaintainer
  • Report abuse
Report abuse

WIP: Resolve "staking=1 should be the default for MNs and SNs"

  • Overview 1
  • Commits 2
  • Pipelines 1
  • Changes 2

This should do the job:

mark@x230:~/src/crown-pos/src$ git diff 9efaaa1a778c7f34ca64aac84c55fdf7d3dabdfe init.cpp
diff --git a/src/init.cpp b/src/init.cpp
index 722c2c115..833c33929 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -801,6 +801,12 @@ bool AppInit2(boost::thread_group& threadGroup)
     if (nFD - MIN_CORE_FILEDESCRIPTORS < nMaxConnections)
         nMaxConnections = nFD - MIN_CORE_FILEDESCRIPTORS;
 
+    // -masternode or -systemnode imply staking
+    if (GetBoolArg("-masternode", false) || GetBoolArg("-systemnode", false)) {
+        if (SoftSetBoolArg("-staking", true))
+            LogPrintf("AppInit2 : parameter interaction: -masternode or -systemnode -> setting -staking=1\n");
+    }
+
     // ********************************************************* Step 3: parameter-to-internal-flags
 
     fDebug = !mapMultiArgs["-debug"].empty();
Edited Mar 02, 2019 by Mark Brooker
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 308-staking-1-should-be-the-default-for-mns-and-sns