diff options
-rw-r--r-- | configure.ac | 11 | ||||
-rwxr-xr-x | contrib/devtools/check-doc.py | 2 | ||||
-rw-r--r-- | depends/packages/fontconfig.mk | 6 | ||||
-rw-r--r-- | src/chainparams.cpp | 14 | ||||
-rw-r--r-- | src/dbwrapper.cpp | 6 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 12 |
6 files changed, 33 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index aea5d7160c..ba523d3762 100644 --- a/configure.ac +++ b/configure.ac @@ -258,14 +258,13 @@ if test "x$CXXFLAGS_overridden" = "xno"; then AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough],[CXXFLAGS="$CXXFLAGS -Wno-implicit-fallthrough"],,[[$CXXFLAG_WERROR]]) - - # Check for optional instruction set support. Enabling these does _not_ imply that all code will - # be compiled with them, rather that specific objects/libs may use them after checking for runtime - # compatibility. - AX_CHECK_COMPILE_FLAG([-msse4.2],[[SSE42_CXXFLAGS="-msse4.2"]],,[[$CXXFLAG_WERROR]]) - fi +# Check for optional instruction set support. Enabling these does _not_ imply that all code will +# be compiled with them, rather that specific objects/libs may use them after checking for runtime +# compatibility. +AX_CHECK_COMPILE_FLAG([-msse4.2],[[SSE42_CXXFLAGS="-msse4.2"]],,[[$CXXFLAG_WERROR]]) + TEMP_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $SSE42_CXXFLAGS" AC_MSG_CHECKING(for assembler crc32 support) diff --git a/contrib/devtools/check-doc.py b/contrib/devtools/check-doc.py index 150f368513..3b7a8f9a61 100755 --- a/contrib/devtools/check-doc.py +++ b/contrib/devtools/check-doc.py @@ -21,7 +21,7 @@ CMD_GREP_DOCS = r"egrep -r -I 'HelpMessageOpt\(\"\-[^\"=]+?(=|\")' %s" % (CMD_RO REGEX_ARG = re.compile(r'(?:map(?:Multi)?Args(?:\.count\(|\[)|Get(?:Bool)?Arg\()\"(\-[^\"]+?)\"') REGEX_DOC = re.compile(r'HelpMessageOpt\(\"(\-[^\"=]+?)(?:=|\")') # list unsupported, deprecated and duplicate args as they need no documentation -SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-prematurewitness', '-walletprematurewitness', '-promiscuousmempoolflags', '-blockminsize', '-dbcrashratio']) +SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-prematurewitness', '-walletprematurewitness', '-promiscuousmempoolflags', '-blockminsize', '-dbcrashratio', '-forcecompactdb']) def main(): used = check_output(CMD_GREP_ARGS, shell=True) diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk index fb97e0b9ec..12695db4b9 100644 --- a/depends/packages/fontconfig.mk +++ b/depends/packages/fontconfig.mk @@ -13,7 +13,13 @@ define $(package)_config_cmds $($(package)_autoconf) endef +# 2.12.1 uses CHAR_WIDTH which is reserved and clashes with some glibc versions, but newer versions of fontconfig +# have broken makefiles which needlessly attempt to re-generate headers with gperf. +# Instead, change all uses of CHAR_WIDTH, and disable the rule that forces header re-generation. +# This can be removed once the upstream build is fixed. define $(package)_build_cmds + sed -i 's/CHAR_WIDTH/CHARWIDTH/g' fontconfig/fontconfig.h src/fcobjshash.gperf src/fcobjs.h src/fcobjshash.h && \ + sed -i 's/fcobjshash.h: fcobjshash.gperf/fcobjshash.h:/' src/Makefile && \ $(MAKE) endef diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 02c8abb100..2021ec51db 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -162,11 +162,11 @@ public: }; chainTxData = ChainTxData{ - // Data as of block 00000000000000000166d612d5595e2b1cd88d71d695fc580af64d8da8658c23 (height 446482). - 1483472411, // * UNIX timestamp of last known number of transactions - 184495391, // * total number of transactions between genesis and that timestamp + // Data as of block 000000000000000000d97e53664d17967bd4ee50b23abb92e54a34eb222d15ae (height 478913). + 1501801925, // * UNIX timestamp of last known number of transactions + 243756039, // * total number of transactions between genesis and that timestamp // (the tx=... number in the SetBestChain debug.log lines) - 3.2 // * estimated number of transactions per second after that timestamp + 3.1 // * estimated number of transactions per second after that timestamp }; } }; @@ -250,9 +250,9 @@ public: }; chainTxData = ChainTxData{ - // Data as of block 00000000c2872f8f8a8935c8e3c5862be9038c97d4de2cf37ed496991166928a (height 1063660) - 1483546230, - 12834668, + // Data as of block 00000000000001c200b9790dc637d3bb141fe77d155b966ed775b17e109f7c6c (height 1156179) + 1501802953, + 14706531, 0.15 }; diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp index ba9e21cc1f..3626e0177f 100644 --- a/src/dbwrapper.cpp +++ b/src/dbwrapper.cpp @@ -115,6 +115,12 @@ CDBWrapper::CDBWrapper(const fs::path& path, size_t nCacheSize, bool fMemory, bo dbwrapper_private::HandleError(status); LogPrintf("Opened LevelDB successfully\n"); + if (GetBoolArg("-forcecompactdb", false)) { + LogPrintf("Starting database compaction of %s\n", path.string()); + pdb->CompactRange(nullptr, nullptr); + LogPrintf("Finished database compaction of %s\n", path.string()); + } + // The base-case obfuscation key, which is a noop. obfuscate_key = std::vector<unsigned char>(OBFUSCATE_KEY_NUM_BYTES, '\000'); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index cf75cdd744..d236b1de3f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2789,10 +2789,6 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT // selected to meet nFeeNeeded result in a transaction that // requires less fee than the prior iteration. - // TODO: The case where nSubtractFeeFromAmount > 0 remains - // to be addressed because it requires returning the fee to - // the payees and not the change output. - // If we have no change and a big enough excess fee, then // try to construct transaction again only without picking // new inputs. We now know we only need the smaller fee @@ -2819,6 +2815,8 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT else if (!pick_new_inputs) { // This shouldn't happen, we should have had enough excess // fee to pay for the new output and still meet nFeeNeeded + // Or we should have just subtracted fee from recipients and + // nFeeNeeded should not have changed strFailReason = _("Transaction fee and change calculation failed"); return false; } @@ -2835,6 +2833,12 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT } } + // If subtracting fee from recipients, we now know what fee we + // need to subtract, we have no reason to reselect inputs + if (nSubtractFeeFromAmount > 0) { + pick_new_inputs = false; + } + // Include more fee and try again. nFeeRet = nFeeNeeded; continue; |