From aeccc23943e32a14940ea80f2564026532267eb4 Mon Sep 17 00:00:00 2001 From: chromatic Date: Sun, 22 Aug 2021 12:28:52 -0700 Subject: [PATCH 1/4] Return value from non-void function --- src/dogecoin-fees.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dogecoin-fees.cpp b/src/dogecoin-fees.cpp index 890908ad6..96f8655cf 100644 --- a/src/dogecoin-fees.cpp +++ b/src/dogecoin-fees.cpp @@ -23,6 +23,7 @@ CAmount GetDogecoinWalletFee(size_t nBytes_) { //mlumin: super simple fee calc for dogecoin CAmount nFee=GetDogecoinWalletFeeRate().GetFee(nBytes_); + return nFee; } //mlumin 5/2021: Establish a wallet rate of n koinu per kb. From a9a5736df8e3678e546d51549ff3ce2e5a073a19 Mon Sep 17 00:00:00 2001 From: chromatic Date: Sun, 22 Aug 2021 12:34:59 -0700 Subject: [PATCH 2/4] Add explicit braces to avoid ambiguous else --- src/rpc/mining.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 0637d6b33..0e5376990 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -151,13 +151,14 @@ UniValue generateBlocks(boost::shared_ptr coinbaseScript, int nG } } std::shared_ptr shared_pblock = std::make_shared(*pblock); - if (!ProcessNewBlock(Params(), shared_pblock, true, NULL)) + if (!ProcessNewBlock(Params(), shared_pblock, true, NULL)) { if (nMineAuxPow) { continue; } else { throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); } + } ++nHeight; blockHashes.push_back(pblock->GetHash().GetHex()); From d8643a4129a2b0497744d31bdaaeffbc363e2f55 Mon Sep 17 00:00:00 2001 From: chromatic Date: Sun, 22 Aug 2021 12:33:29 -0700 Subject: [PATCH 3/4] Fix variable name; otherwise interpreted as label --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index fa8526686..c60b2a3f2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3904,7 +3904,7 @@ bool CWallet::ParameterInteraction() if (!IsArgSet("-mintxfee") && payTxFee < CWallet::minTxFee) { LogPrintf("%s: parameter interaction: -paytxfee=%s -> setting -mintxfee=%s\n", __func__, GetArg("-paytxfee",""), GetArg("-paytxfee","")); - CWallet:minTxFee = CFeeRate(nFeePerK,1000); + CWallet::minTxFee = CFeeRate(nFeePerK,1000); } } if (IsArgSet("-maxtxfee")) From 622d1cc126f0ea8554de9d1421782cc7447b927c Mon Sep 17 00:00:00 2001 From: chromatic Date: Sun, 22 Aug 2021 12:33:50 -0700 Subject: [PATCH 4/4] Clean up whitespace in modified code --- src/rpc/mining.cpp | 4 ++-- src/wallet/wallet.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 0e5376990..35320ecdf 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -155,8 +155,8 @@ UniValue generateBlocks(boost::shared_ptr coinbaseScript, int nG if (nMineAuxPow) { continue; } - else { - throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); + else { + throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); } } ++nHeight; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index c60b2a3f2..d0fcdfdef 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3900,10 +3900,10 @@ bool CWallet::ParameterInteraction() GetArg("-paytxfee", ""), ::minRelayTxFeeRate.ToString())); } - // if -mintxfee is not set, then a lower payTxFee overrides minTxFee - if (!IsArgSet("-mintxfee") && payTxFee < CWallet::minTxFee) + // if -mintxfee is not set, then a lower payTxFee overrides minTxFee + if (!IsArgSet("-mintxfee") && payTxFee < CWallet::minTxFee) { - LogPrintf("%s: parameter interaction: -paytxfee=%s -> setting -mintxfee=%s\n", __func__, GetArg("-paytxfee",""), GetArg("-paytxfee","")); + LogPrintf("%s: parameter interaction: -paytxfee=%s -> setting -mintxfee=%s\n", __func__, GetArg("-paytxfee",""), GetArg("-paytxfee","")); CWallet::minTxFee = CFeeRate(nFeePerK,1000); } }