hyperledger-labs / perun-node

State channel node of the blockchain-agnostic state channels framework Perun.
https://labs.hyperledger.org/perun-doc/
Apache License 2.0
18 stars 12 forks source link

Update adjudicator event handler #198

Closed manoranjith closed 3 years ago

manoranjith commented 3 years ago

Motivation / Context

In the handler for adjudicator events,

  1. Comments tell that Registered events are not received in case of collaborative close. But the implementation does not skip these events. This needs to be fixed.
  2. In case of non-collaborative close, Concluded event is assumed to be received after the channel is settled. But this is not necessary, because the event is received and handled by the go-perun framework withing the ch.Settle call itself. So this event can be skipped.

Description

Update the HandleAdjudicator function to handle the two scenarios described above.

Tests have to be added to channel close notification is properly received.

Relates to