Skip to content
This repository was archived by the owner on Jan 27, 2022. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions blockchain_connector/docker/Dockerfile-ethereum
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Required to create nested asyncio loop
RUN pip3 install nest_asyncio

# Installing web3 for ethereum
RUN pip3 install --upgrade setuptools json-rpc web3 py-solc-x nose2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import json
import logging
import asyncio
import nest_asyncio

from avalon_sdk.connector.blockchains.ethereum.ethereum_listener \
import BlockchainInterface, EventProcessor
Expand Down Expand Up @@ -92,6 +93,7 @@ def workorder_event_handler_func(event, account, contract):
# Listening only for workOrderSubmitted event now
listener = w3.newListener(contract, "workOrderSubmitted")

nest_asyncio.apply()
try:
daemon = EventProcessor(self._config)
asyncio.get_event_loop().run_until_complete(daemon.start(
Expand Down