mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-13 12:33:40 +02:00
remove BitcoinCoreWallet
This commit is contained in:
parent
6aaabb2f30
commit
2a0757c4bc
2 changed files with 2 additions and 32 deletions
|
|
@ -1,16 +1,10 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import BaseHTTPServer
|
||||
import abc
|
||||
import ast
|
||||
import json
|
||||
import os
|
||||
import pprint
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
import binascii
|
||||
from decimal import Decimal
|
||||
from twisted.internet import reactor, task
|
||||
|
|
@ -19,7 +13,7 @@ import btc
|
|||
|
||||
from jmclient.jsonrpc import JsonRpcConnectionError, JsonRpcError
|
||||
from jmclient.configure import get_p2pk_vbyte, jm_single
|
||||
from jmbase.support import get_log, chunks
|
||||
from jmbase.support import get_log
|
||||
|
||||
log = get_log()
|
||||
|
||||
|
|
@ -425,9 +419,6 @@ class BitcoinCoreInterface(BlockchainInterface):
|
|||
Bitcoin Core instance, in which case "fast" should have been
|
||||
specifically disabled by the user.
|
||||
"""
|
||||
from jmclient.wallet import BitcoinCoreWallet
|
||||
if isinstance(wallet, BitcoinCoreWallet):
|
||||
return
|
||||
wallet_name = self.get_wallet_name(wallet)
|
||||
agd = self.rpc('listaddressgroupings', [])
|
||||
#flatten all groups into a single list; then, remove duplicates
|
||||
|
|
@ -516,10 +507,6 @@ class BitcoinCoreInterface(BlockchainInterface):
|
|||
|
||||
|
||||
def sync_addresses(self, wallet, restart_cb=None):
|
||||
from jmclient.wallet import BitcoinCoreWallet
|
||||
|
||||
if isinstance(wallet, BitcoinCoreWallet):
|
||||
return
|
||||
log.debug('requesting detailed wallet history')
|
||||
wallet_name = self.get_wallet_name(wallet)
|
||||
#TODO It is worth considering making this user configurable:
|
||||
|
|
@ -653,10 +640,6 @@ class BitcoinCoreInterface(BlockchainInterface):
|
|||
self.unspent_monitoring_loop.stop()
|
||||
|
||||
def sync_unspent(self, wallet):
|
||||
from jmclient.wallet import BitcoinCoreWallet
|
||||
|
||||
if isinstance(wallet, BitcoinCoreWallet):
|
||||
return
|
||||
st = time.time()
|
||||
wallet_name = self.get_wallet_name(wallet)
|
||||
wallet.unspent = {}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ from jmclient import (load_program_config, jm_single, sync_wallet,
|
|||
AbstractWallet, get_p2pk_vbyte, get_log, Wallet, select,
|
||||
select_gradual, select_greedy, select_greediest,
|
||||
estimate_tx_fee, encryptData, get_network, WalletError,
|
||||
BitcoinCoreWallet, BitcoinCoreInterface, SegwitWallet,
|
||||
BitcoinCoreInterface, SegwitWallet,
|
||||
wallet_generate_recover_bip39, decryptData, encryptData)
|
||||
from jmbase.support import chunks
|
||||
from taker_test_data import t_obtained_tx, t_raw_signed_tx
|
||||
|
|
@ -265,19 +265,6 @@ def test_index_ahead_cache(setup_wallets):
|
|||
assert is_index_ahead_of_cache(wallet, 3, 1)
|
||||
|
||||
|
||||
def test_core_wallet_no_sync(setup_wallets):
|
||||
"""Ensure BitcoinCoreWallet sync attempt does nothing
|
||||
"""
|
||||
wallet = BitcoinCoreWallet("")
|
||||
#this will not trigger sync due to absence of non-zero index_cache, usually.
|
||||
wallet.index_cache = [[1, 1]]
|
||||
jm_single().bc_interface.wallet_synced = False
|
||||
jm_single().bc_interface.sync_wallet(wallet, fast=True)
|
||||
assert not jm_single().bc_interface.wallet_synced
|
||||
jm_single().bc_interface.sync_wallet(wallet)
|
||||
assert not jm_single().bc_interface.wallet_synced
|
||||
|
||||
|
||||
def test_wrong_network_bci(setup_wallets):
|
||||
rpc = jm_single().bc_interface.jsonRpc
|
||||
with pytest.raises(Exception) as e_info:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue