Dash Core  0.12.2.1
P2P Digital Currency
disablewallet.py
Go to the documentation of this file.
1 #!/usr/bin/env python2
2 # Copyright (c) 2014-2015 The Bitcoin Core developers
3 # Distributed under the MIT software license, see the accompanying
4 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #
7 # Exercise API with -disablewallet.
8 #
9 
10 from test_framework.test_framework import BitcoinTestFramework
11 from test_framework.util import *
12 
13 
15 
16  def setup_chain(self):
17  print("Initializing test directory "+self.options.tmpdir)
18  initialize_chain_clean(self.options.tmpdir, 1)
19 
20  def setup_network(self, split=False):
21  self.nodes = start_nodes(1, self.options.tmpdir, [['-disablewallet']])
22  self.is_network_split = False
23  self.sync_all()
24 
25  def run_test (self):
26  # Check regression: https://github.com/bitcoin/bitcoin/issues/6963#issuecomment-154548880
27  x = self.nodes[0].validateaddress('7TSBtVu959hGEGPKyHjJz9k55RpWrPffXz')
28  assert(x['isvalid'] == False)
29  x = self.nodes[0].validateaddress('ycwedq2f3sz2Yf9JqZsBCQPxp18WU3Hp4J')
30  assert(x['isvalid'] == True)
31 
32 if __name__ == '__main__':
33  DisableWalletTest ().main ()
UniValue validateaddress(const UniValue &params, bool fHelp)
Definition: misc.cpp:270
def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, binary=None)
Definition: util.py:305
def initialize_chain_clean(test_dir, num_nodes)
Definition: util.py:252
def setup_network(self, split=False)