Remove hardcoded ipc path

This commit is contained in:
nolash 2020-10-17 12:25:34 +02:00
parent f92e2878cd
commit 14e3581b3d
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,5 @@
* 0.2.4
- Remove hardcoded ipc path in middleware
* 0.2.3
- Use dsn and config for keystore database settings
* 0.2.2

View File

@ -9,13 +9,13 @@ re_http = re.compile('^https?://')
#def create_middleware(ipcaddr='/var/run/cic-platform/cic.ipc'):
def create_middleware(ipcaddr='/tmp/foo.ipc'):
PlatformMiddleware.ipcaddr = ipcaddr
def create_middleware(ipcpath):
PlatformMiddleware.ipcaddr = ipcpath
return PlatformMiddleware
# overrides the original Web3 constructor
def Web3(blockchain_provider='ws://localhost:8546', ipcaddr=None):
def Web3(blockchain_provider='ws://localhost:8546', ipcpath='/run/crypto-dev-signer/jsonrpc.ipc'):
provider = None
if re.match(re_websocket, blockchain_provider) != None:
provider = WebsocketProvider(blockchain_provider)
@ -24,6 +24,6 @@ def Web3(blockchain_provider='ws://localhost:8546', ipcaddr=None):
w3 = Web3super(provider)
w3.middleware_onion.add(create_middleware())
w3.middleware_onion.add(create_middleware(ipcpath))
w3.eth.personal = w3.geth.personal
return w3

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name="crypto-dev-signer",
version="0.2.3",
version="0.2.4",
description="A signer and keystore daemon and library for cryptocurrency software development",
author="Louis Holbrook",
author_email="dev@holbrook.no",