88
99from coincurve import PrivateKey
1010from eth_utils import is_binary_address
11+ from gevent .event import AsyncResult , Event
1112from gevent .lock import Semaphore
1213
1314from raiden import constants , routing , waiting
5152 create_default_identifier ,
5253 typing ,
5354)
54- from raiden .utils .gevent_utils import RaidenAsyncResult , RaidenGreenletEvent
5555
5656log = structlog .get_logger (__name__ ) # pylint: disable=invalid-name
5757
@@ -145,7 +145,7 @@ def __init__(
145145 self .tokennetworkids_to_connectionmanagers = dict ()
146146 self .identifier_to_results : typing .Dict [
147147 typing .PaymentIdentifier ,
148- RaidenAsyncResult ,
148+ AsyncResult ,
149149 ] = dict ()
150150
151151 self .chain : BlockChainService = chain
@@ -164,8 +164,8 @@ def __init__(
164164 self .blockchain_events = BlockchainEvents ()
165165 self .alarm = AlarmTask (chain )
166166 self .shutdown_timeout = config ['shutdown_timeout' ]
167- self .stop_event = RaidenGreenletEvent ()
168- self .start_event = RaidenGreenletEvent ()
167+ self .stop_event = Event ()
168+ self .start_event = Event ()
169169 self .chain .client .inject_stop_event (self .stop_event )
170170
171171 self .wal = None
@@ -194,7 +194,7 @@ def __init__(
194194
195195 self .event_poll_lock = gevent .lock .Semaphore ()
196196
197- def start_async (self ) -> RaidenGreenletEvent :
197+ def start_async (self ) -> Event :
198198 """ Start the node asynchronously. """
199199 self .start_event .clear ()
200200 self .stop_event .clear ()
@@ -299,13 +299,13 @@ def start_async(self) -> RaidenGreenletEvent:
299299 def set_start_on_registration (_ ):
300300 self .start_event .set ()
301301
302- endpoint_registration_greenlet .link_safe (set_start_on_registration )
302+ endpoint_registration_greenlet .link (set_start_on_registration )
303303 else :
304304 self .start_event .set ()
305305
306306 return self .start_event
307307
308- def start (self ) -> RaidenGreenletEvent :
308+ def start (self ) -> Event :
309309 """ Start the node. """
310310 self .start_async ().wait ()
311311
@@ -592,7 +592,7 @@ def start_mediated_transfer(
592592 if identifier in self .identifier_to_results :
593593 return self .identifier_to_results [identifier ]
594594
595- async_result = RaidenAsyncResult ()
595+ async_result = AsyncResult ()
596596 self .identifier_to_results [identifier ] = async_result
597597
598598 secret = random_secret ()
0 commit comments