GithubHelp home page GithubHelp logo

Comments (4)

dooglus avatar dooglus commented on July 17, 2024

I'm unable to reproduce this.

Please indicate how you trigger the problem, and what symptoms you see.

I added some debug and it appears to me that the change happens as soon as I click 'OK' or 'Apply' in the settings dialog:

nReserveBalance = 0.00 in CWallet::CreateCoinStake()
nReserveBalance = 0.00 in CWallet::CreateCoinStake()
nReserveBalance = 0.00 in CWallet::CreateCoinStake()
CHANGED Fee
CHANGED ReserveBalance
CHANGED StartAtStartup
nReserveBalance = 100.00 in CWallet::CreateCoinStake()
nReserveBalance = 100.00 in CWallet::CreateCoinStake()
nReserveBalance = 100.00 in CWallet::CreateCoinStake()
nReserveBalance = 100.00 in CWallet::CreateCoinStake()
nReserveBalance = 100.00 in CWallet::CreateCoinStake()
CHANGED Fee
CHANGED ReserveBalance
CHANGED StartAtStartup
nReserveBalance = 0.00 in CWallet::CreateCoinStake()
nReserveBalance = 0.00 in CWallet::CreateCoinStake()
nReserveBalance = 0.00 in CWallet::CreateCoinStake()

from clams.

dooglus avatar dooglus commented on July 17, 2024

Here are the changes I made to add the debug:

$ git diff
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 14537e1..ae0ff79 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -193,6 +193,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
         switch(index.row())
         {
         case StartAtStartup:
+            printf("CHANGED StartAtStartup\n");
             successful = GUIUtil::SetStartOnSystemStartup(value.toBool());
             break;
         case MinimizeToTray:
@@ -244,11 +245,13 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
         }
         break;
         case Fee:
+            printf("CHANGED Fee\n");
             nTransactionFee = value.toLongLong();
             settings.setValue("nTransactionFee", (qint64) nTransactionFee);
             emit transactionFeeChanged(nTransactionFee);
             break;
         case ReserveBalance:
+            printf("CHANGED ReserveBalance\n");
             nReserveBalance = value.toLongLong();
             settings.setValue("nReserveBalance", (qint64) nReserveBalance);
             emit reserveBalanceChanged(nReserveBalance);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index b267094..b7c9918 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1597,6 +1597,8 @@ bool CWallet::GetExpectedStakeTime(uint64_t& nExpected)

 bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64_t nSearchInterval, int64_t nFees, CTransaction& txNew, CKey& key)
 {
+    printf("nReserveBalance = %s in CWallet::CreateCoinStake()\n", FormatMoney(nReserveBalance).c_str());
+
     CBlockIndex* pindexPrev = pindexBest;
     CBigNum bnTargetPerCoinDay;
     bnTargetPerCoinDay.SetCompact(nBits);

from clams.

l0rdicon avatar l0rdicon commented on July 17, 2024

Thank you for confirming this.

I had suggested to creative last night that the reserve did in fact update
without a reset but hadn't gotten to confirming it with debug.

Your stake weight updates in the ui which lead me to believe there was no
error.

Was the user issuing the command over rpc or from the user interface?

I'll test the rpc function when I get back to my computer

from clams.

dooglus avatar dooglus commented on July 17, 2024

I just tried the RPC function and it seems to work as intended.

from clams.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.