Skip to content

Commit f235b6a

Browse files
committed
Apply review suggestions/fixes
1 parent 6a515e5 commit f235b6a

File tree

6 files changed

+22
-21
lines changed

6 files changed

+22
-21
lines changed

qa/rpc-tests/disablewallet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ def run_test (self):
3131

3232
# Checking mining to an address without a wallet
3333
try:
34-
self.nodes[0].generatetoaddress(1, 'mneYUmWYsuk7kySiURxCi3AGxrAqZxLgPZ')
34+
self.nodes[0].generatetoaddress(1, 'ycwedq2f3sz2Yf9JqZsBCQPxp18WU3Hp4J')
3535
except JSONRPCException,e:
3636
assert("Invalid address" not in e.error['message'])
3737
assert("ProcessNewBlock, block not accepted" not in e.error['message'])
3838
assert("Couldn't create new block" not in e.error['message'])
3939

4040
try:
41-
self.nodes[0].generatetoaddress(1, '3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy')
41+
self.nodes[0].generatetoaddress(1, '7TSBtVu959hGEGPKyHjJz9k55RpWrPffXz')
4242
raise AssertionError("Must not mine to invalid address!")
4343
except JSONRPCException,e:
4444
assert("Invalid address" in e.error['message'])

qa/rpc-tests/importprunedfunds.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,21 +87,21 @@ def run_test (self):
8787

8888
assert('No addresses' in errorString)
8989

90-
balance1 = self.nodes[1].getbalance("", 0, True)
90+
balance1 = self.nodes[1].getbalance("", 0, False, True)
9191
assert_equal(balance1, Decimal(0))
9292

9393
#Import with affiliated address with no rescan
9494
self.nodes[1].importaddress(address2, "", False)
9595
result2 = self.nodes[1].importprunedfunds(rawtxn2, proof2, "")
96-
balance2 = Decimal(self.nodes[1].getbalance("", 0, True))
96+
balance2 = Decimal(self.nodes[1].getbalance("", 0, False, True))
9797
assert_equal(balance2, Decimal('0.05'))
9898

9999
#Import with private key with no rescan
100100
self.nodes[1].importprivkey(address3_privkey, "", False)
101101
result3 = self.nodes[1].importprunedfunds(rawtxn3, proof3, "")
102-
balance3 = Decimal(self.nodes[1].getbalance("", 0, False))
102+
balance3 = Decimal(self.nodes[1].getbalance("", 0, False, False))
103103
assert_equal(balance3, Decimal('0.025'))
104-
balance3 = Decimal(self.nodes[1].getbalance("", 0, True))
104+
balance3 = Decimal(self.nodes[1].getbalance("", 0, False, True))
105105
assert_equal(balance3, Decimal('0.075'))
106106

107107
#Addresses Test - after import
@@ -124,16 +124,16 @@ def run_test (self):
124124

125125
assert('does not exist' in errorString)
126126

127-
balance1 = Decimal(self.nodes[1].getbalance("", 0, True))
127+
balance1 = Decimal(self.nodes[1].getbalance("", 0, False, True))
128128
assert_equal(balance1, Decimal('0.075'))
129129

130130

131131
self.nodes[1].removeprunedfunds(txnid2)
132-
balance2 = Decimal(self.nodes[1].getbalance("", 0, True))
132+
balance2 = Decimal(self.nodes[1].getbalance("", 0, False, True))
133133
assert_equal(balance2, Decimal('0.025'))
134134

135135
self.nodes[1].removeprunedfunds(txnid3)
136-
balance3 = Decimal(self.nodes[1].getbalance("", 0, True))
136+
balance3 = Decimal(self.nodes[1].getbalance("", 0, False, True))
137137
assert_equal(balance3, Decimal('0.0'))
138138

139139
if __name__ == '__main__':

src/init.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
11151115
#ifdef ENABLE_WALLET
11161116
if (!CWallet::ParameterInteraction())
11171117
return false;
1118-
std::string strWalletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
11191118
#endif // ENABLE_WALLET
11201119

11211120
fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", DEFAULT_PERMIT_BAREMULTISIG);
@@ -1235,6 +1234,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
12351234
nWalletBackups = GetArg("-createwalletbackups", 10);
12361235
nWalletBackups = std::max(0, std::min(10, nWalletBackups));
12371236

1237+
std::string strWalletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
1238+
12381239
if(!AutoBackupWallet(NULL, strWalletFile, strWarning, strError)) {
12391240
if (!strWarning.empty())
12401241
InitWarning(strWarning);

src/test/rpc_tests.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -334,22 +334,22 @@ BOOST_AUTO_TEST_CASE(rpc_convert_values_generatetoaddress)
334334
{
335335
UniValue result;
336336

337-
BOOST_CHECK_NO_THROW(result = RPCConvertValues("generatetoaddress", boost::assign::list_of("101")("mkESjLZW66TmHhiFX8MCaBjrhZ543PPh9a")));
337+
BOOST_CHECK_NO_THROW(result = RPCConvertValues("generatetoaddress", boost::assign::list_of("101")("yhq7ifNCtTKEpY4Yu5XPCcztQco6Fh6JsZ")));
338338
BOOST_CHECK_EQUAL(result[0].get_int(), 101);
339-
BOOST_CHECK_EQUAL(result[1].get_str(), "mkESjLZW66TmHhiFX8MCaBjrhZ543PPh9a");
339+
BOOST_CHECK_EQUAL(result[1].get_str(), "yhq7ifNCtTKEpY4Yu5XPCcztQco6Fh6JsZ");
340340

341-
BOOST_CHECK_NO_THROW(result = RPCConvertValues("generatetoaddress", boost::assign::list_of("101")("mhMbmE2tE9xzJYCV9aNC8jKWN31vtGrguU")));
341+
BOOST_CHECK_NO_THROW(result = RPCConvertValues("generatetoaddress", boost::assign::list_of("101")("yTretFTpoi3oQ3maZk5QadGaDWPiKnmDBc")));
342342
BOOST_CHECK_EQUAL(result[0].get_int(), 101);
343-
BOOST_CHECK_EQUAL(result[1].get_str(), "mhMbmE2tE9xzJYCV9aNC8jKWN31vtGrguU");
343+
BOOST_CHECK_EQUAL(result[1].get_str(), "yTretFTpoi3oQ3maZk5QadGaDWPiKnmDBc");
344344

345-
BOOST_CHECK_NO_THROW(result = RPCConvertValues("generatetoaddress", boost::assign::list_of("1")("mkESjLZW66TmHhiFX8MCaBjrhZ543PPh9a")("9")));
345+
BOOST_CHECK_NO_THROW(result = RPCConvertValues("generatetoaddress", boost::assign::list_of("1")("yNbNZyCiTYSFtDwEXt7jChV7tZVYX862ua")("9")));
346346
BOOST_CHECK_EQUAL(result[0].get_int(), 1);
347-
BOOST_CHECK_EQUAL(result[1].get_str(), "mkESjLZW66TmHhiFX8MCaBjrhZ543PPh9a");
347+
BOOST_CHECK_EQUAL(result[1].get_str(), "yNbNZyCiTYSFtDwEXt7jChV7tZVYX862ua");
348348
BOOST_CHECK_EQUAL(result[2].get_int(), 9);
349349

350-
BOOST_CHECK_NO_THROW(result = RPCConvertValues("generatetoaddress", boost::assign::list_of("1")("mhMbmE2tE9xzJYCV9aNC8jKWN31vtGrguU")("9")));
350+
BOOST_CHECK_NO_THROW(result = RPCConvertValues("generatetoaddress", boost::assign::list_of("1")("yTG8jLL3MvteKXgbEcHyaN7JvTPCejQpSh")("9")));
351351
BOOST_CHECK_EQUAL(result[0].get_int(), 1);
352-
BOOST_CHECK_EQUAL(result[1].get_str(), "mhMbmE2tE9xzJYCV9aNC8jKWN31vtGrguU");
352+
BOOST_CHECK_EQUAL(result[1].get_str(), "yTG8jLL3MvteKXgbEcHyaN7JvTPCejQpSh");
353353
BOOST_CHECK_EQUAL(result[2].get_int(), 9);
354354
}
355355

src/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ static const int NO_BLOOM_VERSION = 70201;
3838
static const int SENDHEADERS_VERSION = 70201;
3939

4040
//! "feefilter" tells peers to filter invs to you by fee starts with this version
41-
static const int FEEFILTER_VERSION = 70209;
41+
static const int FEEFILTER_VERSION = 99999; // disable for now (clarify deployment later)
4242

4343
//! DIP0001 was activated in this version
44-
static const int DIP0001_PROTOCOL_VERSION = 99999; // disable for now (clarify deployment later)
44+
static const int DIP0001_PROTOCOL_VERSION = 70208;
4545

4646
#endif // BITCOIN_VERSION_H

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4530,7 +4530,7 @@ bool CWallet::InitLoadWallet()
45304530
walletInstance->GenerateNewHDChain();
45314531

45324532
// ensure this wallet.dat can only be opened by clients supporting HD
4533-
pwalletMain->SetMinVersion(FEATURE_HD);
4533+
walletInstance->SetMinVersion(FEATURE_HD);
45344534
}
45354535

45364536
CPubKey newDefaultKey;

0 commit comments

Comments
 (0)