commit 14e3581b3d760157d8649392e335ac1166077d87
parent f92e2878cd96e528d032100c5501a43e862b8e5c
Author: nolash <dev@holbrook.no>
Date: Sat, 17 Oct 2020 12:25:34 +0200
Remove hardcoded ipc path
Diffstat:
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -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
diff --git a/crypto_dev_signer/eth/web3ext/__init__.py b/crypto_dev_signer/eth/web3ext/__init__.py
@@ -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
diff --git a/setup.py b/setup.py
@@ -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",