Location
[client, wire]
Problem
Currently, multiple conventions are used for naming structs that represent off-chain messages.
- Exported types and suffix
Msg (see wire/controlmsgs.go): ShutdownMsg, PingMsg etc.,
- Exported types with no suffix or prefix (see client/proposalmsgs.go): LedgerChannelProposal, LedgerChannelProposalAcc etc.,
- Unexported types with no suffix or prefix (see client/updatemsgs.go): virtualChannelFundingProposal and virtualChannelSettlementProposal
- Unexported types with prefix
msg (see client/updatemsgs.go): msgChannelUpdate, msgChannelUpdateAcc
The has two issues:
- For implementing the protobuff adapter, all the types that represent off-chain messages must be exported.
- It would be better to use a uniform naming convention, to make it more readable.
Proposal
My proposal is to consistently use the first style (exported types with suffix Msg for all the types.