Node State Check API
added a new message in protocol messages for handling node state comparison
we are expecting node to send us a serialized verision of ChannelEntry struct which is the compared by our state for the particular channel id.
I have added paritaleq, docs and serializable/deserializable derives for the existing structs so that we can make use of them and they are there in public documentation of the crate. Specifically custom implementation of PartialEq for:
- CommitmentInfo2 (contains sorted list of HtlcInfo2 so we just make sure all elements are there irrespective of order)
- CounterpartyCommitmentSecrets (where we filter zeroed out secrets and sort using commitment number)
For testability of handler I have created a new test harness that we can extend if needed.
Another change we have done is we don't panic why trying to get a channel from persistence and it's missing instead we return a NotFound error now
resolves #35
Edited by Lakshya Singh