Skip to content

🐛 [client] Fix NewRandomLedgerChannelProposal#55

Merged
ggwpez merged 1 commit intohyperledger-labs:devfrom
perun-network:fix-random-ledgerchannelproposal-20210427
Apr 28, 2021
Merged

🐛 [client] Fix NewRandomLedgerChannelProposal#55
ggwpez merged 1 commit intohyperledger-labs:devfrom
perun-network:fix-random-ledgerchannelproposal-20210427

Conversation

@matthiasgeihs
Copy link
Copy Markdown
Contributor

An inconsistent LedgerChannelProposal may have been generated because
the allocation was generated independent of the number of participants.

Signed-off-by: Matthias Geihs matthias@perun.network

An inconsistent LedgerChannelProposal may have been generated because
the allocation was generated independent of the number of participants.

Signed-off-by: Matthias Geihs <matthias@perun.network>
@matthiasgeihs matthiasgeihs requested a review from ggwpez April 27, 2021 15:14
@matthiasgeihs matthiasgeihs marked this pull request as draft April 27, 2021 15:16
@matthiasgeihs matthiasgeihs marked this pull request as ready for review April 27, 2021 15:23
@ggwpez
Copy link
Copy Markdown
Contributor

ggwpez commented Apr 28, 2021

This is indeed a bug, but it was currently prevented by NewRandomBaseChannelProposal internally calling opt.NumParts(rng) on the passed option which would then fix the number of participants.
The second call here to opt.NumParts(rng) is therefore equivalent to base.NumParts().

@ggwpez ggwpez enabled auto-merge April 28, 2021 19:20
@ggwpez ggwpez merged commit b7d09de into hyperledger-labs:dev Apr 28, 2021
@ggwpez ggwpez deleted the fix-random-ledgerchannelproposal-20210427 branch April 28, 2021 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants