Remove hardcoded ipc path
This commit is contained in:
parent
f92e2878cd
commit
14e3581b3d
@ -1,3 +1,5 @@
|
|||||||
|
* 0.2.4
|
||||||
|
- Remove hardcoded ipc path in middleware
|
||||||
* 0.2.3
|
* 0.2.3
|
||||||
- Use dsn and config for keystore database settings
|
- Use dsn and config for keystore database settings
|
||||||
* 0.2.2
|
* 0.2.2
|
||||||
|
@ -9,13 +9,13 @@ re_http = re.compile('^https?://')
|
|||||||
|
|
||||||
|
|
||||||
#def create_middleware(ipcaddr='/var/run/cic-platform/cic.ipc'):
|
#def create_middleware(ipcaddr='/var/run/cic-platform/cic.ipc'):
|
||||||
def create_middleware(ipcaddr='/tmp/foo.ipc'):
|
def create_middleware(ipcpath):
|
||||||
PlatformMiddleware.ipcaddr = ipcaddr
|
PlatformMiddleware.ipcaddr = ipcpath
|
||||||
return PlatformMiddleware
|
return PlatformMiddleware
|
||||||
|
|
||||||
|
|
||||||
# overrides the original Web3 constructor
|
# 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
|
provider = None
|
||||||
if re.match(re_websocket, blockchain_provider) != None:
|
if re.match(re_websocket, blockchain_provider) != None:
|
||||||
provider = WebsocketProvider(blockchain_provider)
|
provider = WebsocketProvider(blockchain_provider)
|
||||||
@ -24,6 +24,6 @@ def Web3(blockchain_provider='ws://localhost:8546', ipcaddr=None):
|
|||||||
|
|
||||||
w3 = Web3super(provider)
|
w3 = Web3super(provider)
|
||||||
|
|
||||||
w3.middleware_onion.add(create_middleware())
|
w3.middleware_onion.add(create_middleware(ipcpath))
|
||||||
w3.eth.personal = w3.geth.personal
|
w3.eth.personal = w3.geth.personal
|
||||||
return w3
|
return w3
|
||||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="crypto-dev-signer",
|
name="crypto-dev-signer",
|
||||||
version="0.2.3",
|
version="0.2.4",
|
||||||
description="A signer and keystore daemon and library for cryptocurrency software development",
|
description="A signer and keystore daemon and library for cryptocurrency software development",
|
||||||
author="Louis Holbrook",
|
author="Louis Holbrook",
|
||||||
author_email="dev@holbrook.no",
|
author_email="dev@holbrook.no",
|
||||||
|
Loading…
Reference in New Issue
Block a user