mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-13 12:33:40 +02:00
add is_segwit_mode() utility function
This commit is contained in:
parent
8ca6cfc057
commit
8b9abef4fb
2 changed files with 5 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ from .cryptoengine import BTCEngine, BTC_P2PKH, BTC_P2SH_P2WPKH, EngineError
|
|||
from .configure import (
|
||||
load_program_config, get_p2pk_vbyte, jm_single, get_network,
|
||||
validate_address, get_irc_mchannels, get_blockchain_interface_instance,
|
||||
get_p2sh_vbyte, set_config)
|
||||
get_p2sh_vbyte, set_config, is_segwit_mode)
|
||||
from .blockchaininterface import (BlockchainInterface, sync_wallet,
|
||||
RegtestBitcoinCoreInterface, BitcoinCoreInterface)
|
||||
from .electruminterface import ElectrumInterface
|
||||
|
|
|
|||
|
|
@ -414,3 +414,7 @@ def get_blockchain_interface_instance(_config):
|
|||
else:
|
||||
raise ValueError("Invalid blockchain source")
|
||||
return bc_interface
|
||||
|
||||
|
||||
def is_segwit_mode():
|
||||
return jm_single().config.get('POLICY', 'segwit') != 'false'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue