You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

disablewallet.py 1.1KB

1234567891011121314151617181920212223242526272829303132
  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. # Exercise API with -disablewallet.
  7. #
  8. from test_framework.test_framework import BitcoinTestFramework
  9. from test_framework.util import *
  10. class DisableWalletTest (BitcoinTestFramework):
  11. def setup_chain(self):
  12. print("Initializing test directory "+self.options.tmpdir)
  13. initialize_chain_clean(self.options.tmpdir, 1)
  14. def setup_network(self, split=False):
  15. self.nodes = start_nodes(1, self.options.tmpdir, [['-disablewallet']])
  16. self.is_network_split = False
  17. self.sync_all()
  18. def run_test (self):
  19. # Check regression: https://github.com/bitcoin/bitcoin/issues/6963#issuecomment-154548880
  20. x = self.nodes[0].validateaddress('3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy')
  21. assert(x['isvalid'] == False)
  22. x = self.nodes[0].validateaddress('mneYUmWYsuk7kySiURxCi3AGxrAqZxLgPZ')
  23. assert(x['isvalid'] == True)
  24. if __name__ == '__main__':
  25. DisableWalletTest ().main ()