go-perun
go-perun copied to clipboard
Account for NumParts in NewRandom...ChannelProposal
NewRandomLedgerChannelProposal
and NewRandomSubChannelProposal
do the same thing. I don't know why. Just was doing the same.
Originally posted by @matthiasgeihs in https://github.com/hyperledger-labs/go-perun/pull/123#discussion_r662396964
Looking at the functions, there is a thing that worries me even more:
NewRandomSubChannelProposal
, NewRandomVirtualChannelProposal
, NewRandomLedgerChannelProposalBy
and NewRandomLedgerChannelProposal
all accept ProposalOpts
instead of RandomOpt
s.
This leads to weird things, like having to hardcode the number of participants to 2 or not being able to modify the ChallengeDuration
.
Maybe this explains our confusion as we looked at the functions in the review :see_no_evil:
PS: I will try to fix it if it is possible in a few lines.
Okay it seems to be a bigger thing, because RandomOpt
s for ParentID
, ParentIDs
, NumParentIDs
, IndexMaps
etc. would need to be created.