mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
json-rpc: Shutdown the JSON-RPC in the context of a DB transaction
This needs to be done separately from the rest of the daemon since we can otherwise not make sure that it happens before the DB is freed and we might still need the DN, and be running in a DB transaction, for some destructors to run.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from fixtures import * # noqa: F401,F403
|
||||
|
||||
import os
|
||||
import pytest
|
||||
import signal
|
||||
import unittest
|
||||
|
||||
@@ -11,13 +10,13 @@ with open('config.vars') as configfile:
|
||||
DEVELOPER = os.getenv("DEVELOPER", config['DEVELOPER']) == "1"
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
@unittest.skipIf(not DEVELOPER, "needs --dev-disconnect")
|
||||
def test_stop_pending_fundchannel(node_factory, executor):
|
||||
"""Stop the daemon while waiting for an accept_channel
|
||||
|
||||
This used to crash the node, since we were calling unreserve_utxo while freeing
|
||||
the daemon, but that needs a DB transaction to be open.
|
||||
This used to crash the node, since we were calling unreserve_utxo while
|
||||
freeing the daemon, but that needs a DB transaction to be open.
|
||||
|
||||
"""
|
||||
l1 = node_factory.get_node()
|
||||
l2 = node_factory.get_node()
|
||||
|
||||
Reference in New Issue
Block a user