From 03c45256e3cc3ece20a0efeabfdc5d80b9ff9ea2 Mon Sep 17 00:00:00 2001 From: Michel van Kessel Date: Mon, 28 Dec 2020 14:22:16 +0100 Subject: [PATCH] bunch of changes --- contrib/tidy_datadir.sh | 12 +-- src/amount.cpp | 1 - src/arith_uint256.cpp | 12 +-- src/blockencodings.cpp | 20 ++-- src/blockencodings.h | 2 +- src/bloom.cpp | 20 ++-- src/bloom.h | 2 +- src/chain.cpp | 10 +- src/chain.h | 83 ++++++++------- src/chainparams.cpp | 13 +-- src/chainparams.h | 11 +- src/chainparamsbase.cpp | 10 +- src/chainparamsbase.h | 4 +- src/checkpoints.cpp | 16 +-- src/checkpoints.h | 2 +- src/checkqueue.h | 9 +- src/clientversion.cpp | 10 +- src/clientversion.h | 2 +- src/coincontrol.h | 2 +- src/coins.cpp | 15 +-- src/coins.h | 34 +++--- src/compat.h | 29 +++-- src/compressor.cpp | 8 +- src/compressor.h | 6 +- src/core_io.h | 2 + src/core_memusage.h | 6 +- src/core_read.cpp | 18 ++-- src/core_write.cpp | 29 +++-- src/dbwrapper.cpp | 18 ++-- src/dbwrapper.h | 12 +-- src/httpserver.cpp | 9 +- src/init.cpp | 175 ++++++++++++++++--------------- src/init.h | 1 + src/net.cpp | 149 +++++++++++++------------- src/net.h | 31 +++--- src/netaddress.cpp | 10 +- src/netaddress.h | 6 +- src/netbase.cpp | 30 +++--- src/netbase.h | 10 +- src/noui.cpp | 8 +- src/tinyformat.h | 29 ++++- src/torcontrol.cpp | 38 +++---- src/torcontrol.h | 2 +- src/txdb.cpp | 11 +- src/txdb.h | 7 +- src/txmempool.cpp | 97 ++++++++--------- src/txmempool.h | 16 +-- src/ui_interface.cpp | 4 +- src/ui_interface.h | 13 ++- src/uint256.cpp | 4 +- src/uint256.h | 4 +- src/undo.h | 10 +- src/util.cpp | 83 +++++++++------ src/util.h | 14 +-- src/utilmoneystr.cpp | 8 +- src/utilmoneystr.h | 3 +- src/utilstrencodings.cpp | 14 +-- src/utiltime.cpp | 6 +- src/utiltime.h | 2 + src/validationinterface.cpp | 2 +- src/validationinterface.h | 1 + src/versionbits.h | 1 + src/wallet/crypter.cpp | 15 ++- src/wallet/crypter.h | 10 +- src/wallet/db.cpp | 15 ++- src/wallet/test/crypto_tests.cpp | 32 +++--- src/wallet/wallet.cpp | 2 +- src/wallet/wallet.h | 5 +- src/wallet/walletdb.cpp | 2 +- 69 files changed, 674 insertions(+), 623 deletions(-) diff --git a/contrib/tidy_datadir.sh b/contrib/tidy_datadir.sh index 8960f8811..016f70e0a 100755 --- a/contrib/tidy_datadir.sh +++ b/contrib/tidy_datadir.sh @@ -7,7 +7,7 @@ if [ -d "$1" ]; then cd "$1" else echo "Usage: $0 " >&2 - echo "Removes obsolete Bitcoin database files" >&2 + echo "Removes obsolete Blackcoin database files" >&2 exit 1 fi @@ -19,22 +19,22 @@ if [ -f wallet.dat -a -f peers.dat -a -f chainstate/CURRENT -a -f blocks/index/C case $LEVEL in 0) - echo "Error: no Bitcoin datadir detected." + echo "Error: no Blackcoin datadir detected." exit 1 ;; 1) - echo "Detected old Bitcoin datadir (before 0.7)." + echo "Detected old Blackcoin datadir (before 0.7)." echo "Nothing to do." exit 0 ;; 2) - echo "Detected Bitcoin 0.7 datadir." + echo "Detected Blackcoin 0.7 datadir." ;; 3) - echo "Detected Bitcoin pre-0.8 datadir." + echo "Detected Blackcoin pre-0.8 datadir." ;; 4) - echo "Detected Bitcoin 0.8 datadir." + echo "Detected Blackcoin 0.8 datadir." ;; esac diff --git a/src/amount.cpp b/src/amount.cpp index 60d3df54f..9e4c422ac 100644 --- a/src/amount.cpp +++ b/src/amount.cpp @@ -4,7 +4,6 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include -#include #include diff --git a/src/arith_uint256.cpp b/src/arith_uint256.cpp index 10d3ac3fa..0cc5d9c29 100644 --- a/src/arith_uint256.cpp +++ b/src/arith_uint256.cpp @@ -244,17 +244,17 @@ uint32_t arith_uint256::GetCompact(bool fNegative) const return nCompact; } -uint256 ArithToUint256(const arith_uint256 &a) +uint256 ArithToUint256(const arith_uint256& a) { uint256 b; - for(int x=0; x +#include +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/src/blockencodings.h b/src/blockencodings.h index 91f9949fd..8eaf6dd57 100644 --- a/src/blockencodings.h +++ b/src/blockencodings.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_BLOCK_ENCODINGS_H #define BITCOIN_BLOCK_ENCODINGS_H -#include "primitives/block.h" +#include #include diff --git a/src/bloom.cpp b/src/bloom.cpp index fd328e8e9..167fef1e4 100644 --- a/src/bloom.cpp +++ b/src/bloom.cpp @@ -2,20 +2,18 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "bloom.h" +#include -#include "primitives/transaction.h" -#include "hash.h" -#include "script/script.h" -#include "script/standard.h" -#include "random.h" -#include "streams.h" +#include +#include +#include