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

Use random nonce when accepting the proposal #119

Closed anagha-ks closed 4 years ago

anagha-ks commented 4 years ago

Description

Feature to use shared nonce was added in go-perun in this commit. But this was missing some changes, which were added later in this commit. This PR will cover the second part which will set nonce-share when accepting a proposal

Category

Improvement

Relevant issue

Closes #101

Testing

All existing tests should pass

Checklist

manoranjith commented 4 years ago

@anagha-ks Tests were failing, as the chProposal was nil, when you tried to access it in acceptChProposal. This was due to two reasons:

  1. It was not assigned to responder entry in HandleProposal
  2. It was being retrieved from map in acceptChProposal using empty key "". Fixed both of them with a separate commit, as i was not able to comment on / suggest changes on those parts of the code.
anagha-ks commented 4 years ago

@anagha-ks Tests were failing, as the chProposal was nil, when you tried to access it in acceptChProposal. This was due to two reasons:

1. It was not assigned to responder entry in `HandleProposal`

2. It was being retrieved from map in `acceptChProposal` using empty key "".
   Fixed both of them with a separate commit, as i was not able to comment on / suggest changes on those parts of the code.

Ok, I got it now.