mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
feat: adds timestamp to state_change notification
This commit is contained in:
committed by
neil saitug
parent
4d765003dd
commit
68ce25c92d
@@ -1,4 +1,5 @@
|
||||
from collections import OrderedDict
|
||||
from datetime import datetime
|
||||
from fixtures import * # noqa: F401,F403
|
||||
from flaky import flaky # noqa: F401
|
||||
from hashlib import sha256
|
||||
@@ -668,6 +669,10 @@ def test_channel_state_changed_bilateral(node_factory, bitcoind):
|
||||
assert(event2['cause'] == "remote")
|
||||
assert(event2['message'] == "Lockin complete")
|
||||
|
||||
# also test the correctness of timestamps once
|
||||
assert(datetime.fromisoformat(event1['timestamp'].replace('Z', '+00:00')))
|
||||
assert(datetime.fromisoformat(event2['timestamp'].replace('Z', '+00:00')))
|
||||
|
||||
# close channel and look for stateful events
|
||||
l1.rpc.close(scid)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user