@@ -279,7 +279,7 @@ func (c *Client) handleChannelProposalRej(
279279 ctx context.Context , p wire.Address ,
280280 req ChannelProposal , reason string ,
281281) error {
282- msgReject := & ChannelProposalRej {
282+ msgReject := & ChannelProposalRejMsg {
283283 ProposalID : req .ProposalID (),
284284 Reason : reason ,
285285 }
@@ -310,7 +310,7 @@ func (c *Client) proposeTwoPartyChannel(
310310 acc , isAcc := e .Msg .(ChannelProposalAccept )
311311 return (isAcc && acc .Base ().ProposalID == proposalID ) ||
312312 (e .Msg .Type () == wire .ChannelProposalRej &&
313- e .Msg .(* ChannelProposalRej ).ProposalID == proposalID )
313+ e .Msg .(* ChannelProposalRejMsg ).ProposalID == proposalID )
314314 }
315315 receiver := wire .NewReceiver ()
316316 defer receiver .Close ()
@@ -330,7 +330,7 @@ func (c *Client) proposeTwoPartyChannel(
330330 }
331331 return nil , errors .WithMessage (err , "receiving proposal response" )
332332 }
333- if rej , ok := env .Msg .(* ChannelProposalRej ); ok {
333+ if rej , ok := env .Msg .(* ChannelProposalRejMsg ); ok {
334334 return nil , newPeerRejectedError ("channel proposal" , rej .Reason )
335335 }
336336
@@ -384,11 +384,11 @@ func (c *Client) validTwoPartyProposal(
384384 }
385385
386386 switch prop := proposal .(type ) {
387- case * SubChannelProposal :
387+ case * SubChannelProposalMsg :
388388 if err := c .validSubChannelProposal (prop ); err != nil {
389389 return errors .WithMessage (err , "validate subchannel proposal" )
390390 }
391- case * VirtualChannelProposal :
391+ case * VirtualChannelProposalMsg :
392392 if err := c .validVirtualChannelProposal (prop , ourIdx ); err != nil {
393393 return errors .WithMessage (err , "validate subchannel proposal" )
394394 }
@@ -397,7 +397,7 @@ func (c *Client) validTwoPartyProposal(
397397 return nil
398398}
399399
400- func (c * Client ) validSubChannelProposal (proposal * SubChannelProposal ) error {
400+ func (c * Client ) validSubChannelProposal (proposal * SubChannelProposalMsg ) error {
401401 parent , ok := c .channels .Channel (proposal .Parent )
402402 if ! ok {
403403 return errors .New ("parent channel does not exist" )
@@ -417,7 +417,7 @@ func (c *Client) validSubChannelProposal(proposal *SubChannelProposal) error {
417417 return nil
418418}
419419
420- func (c * Client ) validVirtualChannelProposal (prop * VirtualChannelProposal , ourIdx channel.Index ) error {
420+ func (c * Client ) validVirtualChannelProposal (prop * VirtualChannelProposalMsg , ourIdx channel.Index ) error {
421421 numParents := len (prop .Parents )
422422 numPeers := prop .NumPeers ()
423423 if numParents != numPeers {
@@ -569,9 +569,9 @@ func (c *Client) completeCPP(
569569
570570func (c * Client ) proposalParent (prop ChannelProposal , partIdx channel.Index ) (parentChannelID * channel.ID , parent * Channel , err error ) {
571571 switch prop := prop .(type ) {
572- case * SubChannelProposal :
572+ case * SubChannelProposalMsg :
573573 parentChannelID = & prop .Parent
574- case * VirtualChannelProposal :
574+ case * VirtualChannelProposalMsg :
575575 parentChannelID = & prop .Parents [partIdx ]
576576 }
577577
@@ -591,20 +591,20 @@ func (c *Client) mpcppParts(
591591 acc ChannelProposalAccept ,
592592) (parts []wallet.Address ) {
593593 switch p := prop .(type ) {
594- case * LedgerChannelProposal :
594+ case * LedgerChannelProposalMsg :
595595 parts = participants (
596596 p .Participant ,
597- acc .(* LedgerChannelProposalAcc ).Participant )
598- case * SubChannelProposal :
597+ acc .(* LedgerChannelProposalAccMsg ).Participant )
598+ case * SubChannelProposalMsg :
599599 ch , ok := c .channels .Channel (p .Parent )
600600 if ! ok {
601601 c .log .Panic ("unknown parent channel ID" )
602602 }
603603 parts = ch .Params ().Parts
604- case * VirtualChannelProposal :
604+ case * VirtualChannelProposalMsg :
605605 parts = participants (
606606 p .Proposer ,
607- acc .(* VirtualChannelProposalAcc ).Responder ,
607+ acc .(* VirtualChannelProposalAccMsg ).Responder ,
608608 )
609609 default :
610610 c .log .Panicf ("unhandled %T" , p )
@@ -614,13 +614,13 @@ func (c *Client) mpcppParts(
614614
615615func (c * Client ) fundChannel (ctx context.Context , ch * Channel , prop ChannelProposal ) error {
616616 switch prop := prop .(type ) {
617- case * LedgerChannelProposal :
617+ case * LedgerChannelProposalMsg :
618618 err := c .fundLedgerChannel (ctx , ch , prop .Base ().FundingAgreement )
619619 return errors .WithMessage (err , "funding ledger channel" )
620- case * SubChannelProposal :
620+ case * SubChannelProposalMsg :
621621 err := c .fundSubchannel (ctx , prop , ch )
622622 return errors .WithMessage (err , "funding subchannel" )
623- case * VirtualChannelProposal :
623+ case * VirtualChannelProposalMsg :
624624 err := c .fundVirtualChannel (ctx , ch , prop )
625625 return errors .WithMessage (err , "funding virtual channel" )
626626 }
@@ -657,7 +657,7 @@ func (c *Client) fundLedgerChannel(ctx context.Context, ch *Channel, agreement c
657657 return c .completeFunding (ctx , ch )
658658}
659659
660- func (c * Client ) fundSubchannel (ctx context.Context , prop * SubChannelProposal , subChannel * Channel ) (err error ) {
660+ func (c * Client ) fundSubchannel (ctx context.Context , prop * SubChannelProposalMsg , subChannel * Channel ) (err error ) {
661661 parentChannel , ok := c .channels .Channel (prop .Parent )
662662 if ! ok {
663663 return errors .New ("referenced parent channel not found" )
@@ -684,7 +684,7 @@ func (c *Client) fundSubchannel(ctx context.Context, prop *SubChannelProposal, s
684684func enableVer0Cache (c wire.Cacher ) * wire.Predicate {
685685 p := func (m * wire.Envelope ) bool {
686686 return m .Msg .Type () == wire .ChannelUpdateAcc &&
687- m .Msg .(* msgChannelUpdateAcc ).Version == 0
687+ m .Msg .(* ChannelUpdateAccMsg ).Version == 0
688688 }
689689 c .Cache (& p )
690690 return & p
0 commit comments