'Create a new bitcoin wallet.'

def create_wallet(self, password=''):

    self._logger.info('Creating    wallet    in    %s', self.wallet_dir)
    def run_on_thread(thread_method):
        wallet_thread = Thread(target=thread_method, name='ethereum-create-wallet')
        wallet_thread.setDaemon(False)
        wallet_thread.start()
        wallet_thread.join()
    seed = Mnemonic('en').make_seed()
    k = keystore.from_seed(seed, '')
    k.update_password(None, password)
    self.storage.put('keystore', k.dump())
    self.storage.put('wallet_type', 'standard')
    self.storage.set_password(password, bool(password))
    run_on_thread(self.storage.write)
    self.wallet = ElectrumWallet(self.storage)
    self.wallet.synchronize()
    run_on_thread(self.wallet.storage.write)
    self.created = True
    if (password is not None):
        self.set_wallet_password(password)
    self.wallet_password = password
    self.start_daemon()
    self.open_wallet()
    self._logger.info("Bitcoin    wallet    saved    in    '%s'", self.wallet.storage.path)
    return succeed(None)
