diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index ea9e90c65..67cf1268d 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -418,7 +418,7 @@ class RPCCoverage(object): if not os.path.isfile(coverage_ref_filename): raise RuntimeError("No coverage reference found") - with open(coverage_ref_filename, 'r') as f: + with open(coverage_ref_filename, 'r', encoding='utf8') as f: all_cmds.update([i.strip() for i in f.readlines()]) for root, dirs, files in os.walk(self.dir): @@ -427,7 +427,7 @@ class RPCCoverage(object): coverage_filenames.add(os.path.join(root, filename)) for filename in coverage_filenames: - with open(filename, 'r') as f: + with open(filename, 'r', encoding='utf8') as f: covered_cmds.update([i.strip() for i in f.readlines()]) return all_cmds - covered_cmds diff --git a/qa/zcash/updatecheck.py b/qa/zcash/updatecheck.py index 90e75bff6..cf1206c99 100755 --- a/qa/zcash/updatecheck.py +++ b/qa/zcash/updatecheck.py @@ -107,7 +107,7 @@ class GitHubToken: def __init__(self): token_path = os.path.join(SOURCE_ROOT, ".updatecheck-token") try: - with open(token_path) as f: + with open(token_path, encoding='utf8') as f: token = f.read().strip() self._user = token.split(":")[0] self._password = token.split(":")[1] diff --git a/src/addrdb.cpp b/src/addrdb.cpp index f3d6e4bd5..81d011dbd 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -36,7 +36,7 @@ bool CBanDB::Write(const banmap_t& banSet) ssBanlist << hash; // open temp output file, and associate with CAutoFile - boost::filesystem::path pathTmp = GetDataDir() / tmpfn; + fs::path pathTmp = GetDataDir() / tmpfn; FILE *file = fopen(pathTmp.string().c_str(), "wb"); CAutoFile fileout(file, SER_DISK, CLIENT_VERSION); if (fileout.IsNull()) @@ -68,7 +68,7 @@ bool CBanDB::Read(banmap_t& banSet) return error("%s: Failed to open file %s", __func__, pathBanlist.string()); // use file size to size memory buffer - uint64_t fileSize = boost::filesystem::file_size(pathBanlist); + uint64_t fileSize = fs::file_size(pathBanlist); uint64_t dataSize = 0; // Don't try to resize to a negative number if file is small if (fileSize >= sizeof(uint256)) diff --git a/src/addrdb.h b/src/addrdb.h index f386d32f6..46eed7db1 100644 --- a/src/addrdb.h +++ b/src/addrdb.h @@ -12,7 +12,6 @@ #include #include -#include class CSubNet; class CAddrMan; @@ -93,7 +92,7 @@ public: class CBanDB { private: - boost::filesystem::path pathBanlist; + fs::path pathBanlist; public: CBanDB(); bool Write(const banmap_t& banSet); diff --git a/src/miner.h b/src/miner.h index 032fce91b..4f2e87659 100644 --- a/src/miner.h +++ b/src/miner.h @@ -8,7 +8,6 @@ #include "primitives/block.h" -#include #include #include diff --git a/src/net.cpp b/src/net.cpp index c35596b91..73c4a79d9 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -21,7 +21,6 @@ #include "primitives/transaction.h" #include "scheduler.h" #include "ui_interface.h" -#include "crypto/common.h" #ifdef WIN32 #include diff --git a/src/script/zcash_script.h b/src/script/zcash_script.h index 804ffafc0..a34963cba 100644 --- a/src/script/zcash_script.h +++ b/src/script/zcash_script.h @@ -3,8 +3,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or https://www.opensource.org/licenses/mit-license.php . -#ifndef BITCOIN_SCRIPT_ZCASHCONSENSUS_H -#define BITCOIN_SCRIPT_ZCASHCONSENSUS_H +#ifndef ZCASH_SCRIPT_ZCASH_SCRIPT_H +#define ZCASH_SCRIPT_ZCASH_SCRIPT_H #include @@ -107,4 +107,4 @@ EXPORT_SYMBOL unsigned int zcash_script_version(); #undef EXPORT_SYMBOL -#endif // BITCOIN_SCRIPT_ZCASHCONSENSUS_H +#endif // ZCASH_SCRIPT_ZCASH_SCRIPT_H diff --git a/src/test/bctest.py b/src/test/bctest.py index 4d7382e61..9859186e6 100644 --- a/src/test/bctest.py +++ b/src/test/bctest.py @@ -39,7 +39,7 @@ def bctest(testDir, testObj, exeext): inputData = None if "input" in testObj: filename = testDir + "/" + testObj['input'] - inputData = open(filename).read() + inputData = open(filename, encoding='utf8').read() stdinCfg = subprocess.PIPE # Read the expected output data (if there is any) @@ -49,7 +49,7 @@ def bctest(testDir, testObj, exeext): outputFn = testObj['output_cmp'] outputType = os.path.splitext(outputFn)[1][1:] # output type from file extension (determines how to compare) try: - outputData = open(testDir + "/" + outputFn).read() + outputData = open(testDir + "/" + outputFn, encoding='utf8').read() except: logging.error("Output file " + outputFn + " can not be opened") raise @@ -105,7 +105,7 @@ def bctest(testDir, testObj, exeext): def bctester(testDir, input_basename, buildenv): """ Loads and parses the input file, runs all tests and reports results""" input_filename = testDir + "/" + input_basename - raw_data = open(input_filename).read() + raw_data = open(input_filename, encoding='utf8').read() input_data = json.loads(raw_data) failed_testcases = [] diff --git a/zcutil/clean.sh b/zcutil/clean.sh index 49f7a12a3..01738dcb0 100755 --- a/zcutil/clean.sh +++ b/zcutil/clean.sh @@ -98,7 +98,7 @@ rm -f src/secp256k1/src/stamp-h1 rm -f src/secp256k1/.so_locations clean_exe src/secp256k1/tests clean_exe src/secp256k1/exhaustive_tests -rm -f src/secp256k1/tests.log src/secp256k1/exhaustive-tests.log src/secp256k1/test-suite.log +rm -f src/secp256k1/tests.log src/secp256k1/exhaustive_tests.log src/secp256k1/test-suite.log clean_dep src/univalue univalue-config.h.in rm -f src/univalue/univalue-config.h