feat: adds timestamp to state_change notification

This commit is contained in:
Michael Schmoock
2020-10-28 11:46:21 +01:00
committed by neil saitug
parent 4d765003dd
commit 68ce25c92d
8 changed files with 19 additions and 5 deletions

View File

@@ -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)