commit
7279efdf55
|
@ -418,7 +418,7 @@ class RPCCoverage(object):
|
||||||
if not os.path.isfile(coverage_ref_filename):
|
if not os.path.isfile(coverage_ref_filename):
|
||||||
raise RuntimeError("No coverage reference found")
|
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()])
|
all_cmds.update([i.strip() for i in f.readlines()])
|
||||||
|
|
||||||
for root, dirs, files in os.walk(self.dir):
|
for root, dirs, files in os.walk(self.dir):
|
||||||
|
@ -427,7 +427,7 @@ class RPCCoverage(object):
|
||||||
coverage_filenames.add(os.path.join(root, filename))
|
coverage_filenames.add(os.path.join(root, filename))
|
||||||
|
|
||||||
for filename in coverage_filenames:
|
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()])
|
covered_cmds.update([i.strip() for i in f.readlines()])
|
||||||
|
|
||||||
return all_cmds - covered_cmds
|
return all_cmds - covered_cmds
|
||||||
|
|
|
@ -107,7 +107,7 @@ class GitHubToken:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
token_path = os.path.join(SOURCE_ROOT, ".updatecheck-token")
|
token_path = os.path.join(SOURCE_ROOT, ".updatecheck-token")
|
||||||
try:
|
try:
|
||||||
with open(token_path) as f:
|
with open(token_path, encoding='utf8') as f:
|
||||||
token = f.read().strip()
|
token = f.read().strip()
|
||||||
self._user = token.split(":")[0]
|
self._user = token.split(":")[0]
|
||||||
self._password = token.split(":")[1]
|
self._password = token.split(":")[1]
|
||||||
|
|
|
@ -36,7 +36,7 @@ bool CBanDB::Write(const banmap_t& banSet)
|
||||||
ssBanlist << hash;
|
ssBanlist << hash;
|
||||||
|
|
||||||
// open temp output file, and associate with CAutoFile
|
// 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");
|
FILE *file = fopen(pathTmp.string().c_str(), "wb");
|
||||||
CAutoFile fileout(file, SER_DISK, CLIENT_VERSION);
|
CAutoFile fileout(file, SER_DISK, CLIENT_VERSION);
|
||||||
if (fileout.IsNull())
|
if (fileout.IsNull())
|
||||||
|
@ -68,7 +68,7 @@ bool CBanDB::Read(banmap_t& banSet)
|
||||||
return error("%s: Failed to open file %s", __func__, pathBanlist.string());
|
return error("%s: Failed to open file %s", __func__, pathBanlist.string());
|
||||||
|
|
||||||
// use file size to size memory buffer
|
// 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;
|
uint64_t dataSize = 0;
|
||||||
// Don't try to resize to a negative number if file is small
|
// Don't try to resize to a negative number if file is small
|
||||||
if (fileSize >= sizeof(uint256))
|
if (fileSize >= sizeof(uint256))
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <boost/filesystem/path.hpp>
|
|
||||||
|
|
||||||
class CSubNet;
|
class CSubNet;
|
||||||
class CAddrMan;
|
class CAddrMan;
|
||||||
|
@ -93,7 +92,7 @@ public:
|
||||||
class CBanDB
|
class CBanDB
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
boost::filesystem::path pathBanlist;
|
fs::path pathBanlist;
|
||||||
public:
|
public:
|
||||||
CBanDB();
|
CBanDB();
|
||||||
bool Write(const banmap_t& banSet);
|
bool Write(const banmap_t& banSet);
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include "primitives/block.h"
|
#include "primitives/block.h"
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "primitives/transaction.h"
|
#include "primitives/transaction.h"
|
||||||
#include "scheduler.h"
|
#include "scheduler.h"
|
||||||
#include "ui_interface.h"
|
#include "ui_interface.h"
|
||||||
#include "crypto/common.h"
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
// file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||||
|
|
||||||
#ifndef BITCOIN_SCRIPT_ZCASHCONSENSUS_H
|
#ifndef ZCASH_SCRIPT_ZCASH_SCRIPT_H
|
||||||
#define BITCOIN_SCRIPT_ZCASHCONSENSUS_H
|
#define ZCASH_SCRIPT_ZCASH_SCRIPT_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -107,4 +107,4 @@ EXPORT_SYMBOL unsigned int zcash_script_version();
|
||||||
|
|
||||||
#undef EXPORT_SYMBOL
|
#undef EXPORT_SYMBOL
|
||||||
|
|
||||||
#endif // BITCOIN_SCRIPT_ZCASHCONSENSUS_H
|
#endif // ZCASH_SCRIPT_ZCASH_SCRIPT_H
|
||||||
|
|
|
@ -39,7 +39,7 @@ def bctest(testDir, testObj, exeext):
|
||||||
inputData = None
|
inputData = None
|
||||||
if "input" in testObj:
|
if "input" in testObj:
|
||||||
filename = testDir + "/" + testObj['input']
|
filename = testDir + "/" + testObj['input']
|
||||||
inputData = open(filename).read()
|
inputData = open(filename, encoding='utf8').read()
|
||||||
stdinCfg = subprocess.PIPE
|
stdinCfg = subprocess.PIPE
|
||||||
|
|
||||||
# Read the expected output data (if there is any)
|
# Read the expected output data (if there is any)
|
||||||
|
@ -49,7 +49,7 @@ def bctest(testDir, testObj, exeext):
|
||||||
outputFn = testObj['output_cmp']
|
outputFn = testObj['output_cmp']
|
||||||
outputType = os.path.splitext(outputFn)[1][1:] # output type from file extension (determines how to compare)
|
outputType = os.path.splitext(outputFn)[1][1:] # output type from file extension (determines how to compare)
|
||||||
try:
|
try:
|
||||||
outputData = open(testDir + "/" + outputFn).read()
|
outputData = open(testDir + "/" + outputFn, encoding='utf8').read()
|
||||||
except:
|
except:
|
||||||
logging.error("Output file " + outputFn + " can not be opened")
|
logging.error("Output file " + outputFn + " can not be opened")
|
||||||
raise
|
raise
|
||||||
|
@ -105,7 +105,7 @@ def bctest(testDir, testObj, exeext):
|
||||||
def bctester(testDir, input_basename, buildenv):
|
def bctester(testDir, input_basename, buildenv):
|
||||||
""" Loads and parses the input file, runs all tests and reports results"""
|
""" Loads and parses the input file, runs all tests and reports results"""
|
||||||
input_filename = testDir + "/" + input_basename
|
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)
|
input_data = json.loads(raw_data)
|
||||||
|
|
||||||
failed_testcases = []
|
failed_testcases = []
|
||||||
|
|
|
@ -98,7 +98,7 @@ rm -f src/secp256k1/src/stamp-h1
|
||||||
rm -f src/secp256k1/.so_locations
|
rm -f src/secp256k1/.so_locations
|
||||||
clean_exe src/secp256k1/tests
|
clean_exe src/secp256k1/tests
|
||||||
clean_exe src/secp256k1/exhaustive_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
|
clean_dep src/univalue univalue-config.h.in
|
||||||
rm -f src/univalue/univalue-config.h
|
rm -f src/univalue/univalue-config.h
|
||||||
|
|
Loading…
Reference in New Issue