Skip to content

Commit b6ae932

Browse files
hackaugustoLefterisJP
authored andcommitted
Removed unused flag leave_channels
The user can still close all channels through the REST API
1 parent 081e552 commit b6ae932

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

raiden/app.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,10 @@ def start(self):
132132
""" Start the raiden app. """
133133
self.raiden.start()
134134

135-
def stop(self, leave_channels: bool = False):
135+
def stop(self):
136136
""" Stop the raiden app.
137137
138138
Args:
139139
leave_channels: if True, also close and settle all channels before stopping
140140
"""
141-
if leave_channels:
142-
self.raiden.close_and_settle()
143-
144141
self.raiden.stop()

raiden/raiden_service.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,10 @@ def start_async(self) -> Event:
221221
)
222222

223223
if self.wal.state_manager.current_state is None:
224-
log.debug('No recoverable state available, created inital state')
224+
log.debug(
225+
'No recoverable state available, created inital state',
226+
node=pex(self.address),
227+
)
225228
block_number = self.chain.block_number()
226229

227230
state_change = ActionInitChain(
@@ -250,7 +253,11 @@ def start_async(self) -> Event:
250253
# for that given block have been processed, filters can be safely
251254
# installed starting from this position without losing events.
252255
last_log_block_number = views.block_number(self.wal.state_manager.current_state)
253-
log.debug('Restored state from WAL', last_restored_block=last_log_block_number)
256+
log.debug(
257+
'Restored state from WAL',
258+
last_restored_block=last_log_block_number,
259+
node=pex(self.address),
260+
)
254261

255262
# Restore the current snapshot group
256263
self.snapshot_group = last_log_block_number // SNAPSHOT_BLOCK_COUNT
@@ -283,6 +290,7 @@ def start_async(self) -> Event:
283290
log.debug(
284291
'Processing pending transactions',
285292
num_pending_transactions=len(pending_transactions),
293+
node=pex(self.address),
286294
)
287295
with self.dispatch_events_lock:
288296
for transaction in pending_transactions:

raiden/tests/utils/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def cleanup_tasks():
1919
def shutdown_apps_and_cleanup_tasks(raiden_apps):
2020
for app in raiden_apps:
2121
try:
22-
app.stop(leave_channels=False)
22+
app.stop()
2323
except RaidenShuttingDown:
2424
pass
2525

raiden/ui/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ def run(self):
925925
else:
926926
# Shouldn't happen
927927
raise RuntimeError(f"Invalid transport type '{self._options['transport']}'")
928-
app.stop(leave_channels=False)
928+
app.stop()
929929
except ReplacementTransactionUnderpriced as e:
930930
print(
931931
'{}. Please make sure that this Raiden node is the '

0 commit comments

Comments
 (0)