update lbrycrd to 17, add option to disable segwit for now

This commit is contained in:
Victor Shyba 2019-08-13 18:07:15 -03:00
parent af1c8ec35c
commit 4d741bd200
2 changed files with 4 additions and 3 deletions

View file

@ -2,7 +2,7 @@ __node_daemon__ = 'lbrycrdd'
__node_cli__ = 'lbrycrd-cli'
__node_bin__ = ''
__node_url__ = (
'https://github.com/lbryio/lbrycrd/releases/download/v0.12.4.1/lbrycrd-linux.zip'
'https://github.com/lbryio/lbrycrd/releases/download/v0.17.2.1/lbrycrd-linux.zip'
)
__spvserver__ = 'lbry.wallet.server.coin.LBCRegTest'

View file

@ -256,7 +256,7 @@ class BlockchainProcess(asyncio.SubprocessProtocol):
class BlockchainNode:
def __init__(self, url, daemon, cli):
def __init__(self, url, daemon, cli, segwit_enabled=False):
self.latest_release_url = url
self.project_dir = os.path.dirname(os.path.dirname(__file__))
self.bin_dir = os.path.join(self.project_dir, 'bin')
@ -272,6 +272,7 @@ class BlockchainNode:
self.rpcport = 9245 + 2 # avoid conflict with default rpc port
self.rpcuser = 'rpcuser'
self.rpcpassword = 'rpcpassword'
self.segwit_enabled = segwit_enabled
@property
def rpc_url(self):
@ -330,7 +331,7 @@ class BlockchainNode:
f'-datadir={self.data_path}', '-printtoconsole', '-regtest', '-server', '-txindex',
f'-rpcuser={self.rpcuser}', f'-rpcpassword={self.rpcpassword}', f'-rpcport={self.rpcport}',
f'-port={self.peerport}'
)
) + () if self.segwit_enabled else ('-addresstype=legacy', '-vbparams=segwit:0:999999999999')
self.log.info(' '.join(command))
self.transport, self.protocol = await loop.subprocess_exec(
BlockchainProcess, *command