lnrpc: move initiator enum out of close summary

Move enum out of CloseSummary struct for more general use. This does
not change the encoding of the enum, and will only cause compile time
errors for existing clients. This enum has not been included in a
release yet, so we can make this move without much disruption.
This commit is contained in:
carla committed 2020-04-03 11:26:11 +02:00
1 parent 0512b39f23
commit 2ae61162db
5 files changed
+822 -821

No files matched your search

+4 -4
View File
@@ -6628,7 +6628,7 @@ func subscribeChannelNotifications(ctxb context.Context, t *harnessTest,
// expected type.
func verifyCloseUpdate(chanUpdate *lnrpc.ChannelEventUpdate,
closeType lnrpc.ChannelCloseSummary_ClosureType,
closeInitiator lnrpc.ChannelCloseSummary_Initiator) error {
closeInitiator lnrpc.Initiator) error {
// We should receive one inactive and one closed notification
// for each channel.
@@ -6772,7 +6772,7 @@ func testBasicChannelCreationAndUpdates(net *lntest.NetworkHarness, t *harnessTe
// receive the correct channel updates in order.
verifyCloseUpdatesReceived := func(sub channelSubscription,
forceType lnrpc.ChannelCloseSummary_ClosureType,
closeInitiator lnrpc.ChannelCloseSummary_Initiator) error {
closeInitiator lnrpc.Initiator) error {
// Ensure one inactive and one closed notification is received for each
// closed channel.
@@ -6818,7 +6818,7 @@ func testBasicChannelCreationAndUpdates(net *lntest.NetworkHarness, t *harnessTe
// close initiator because Alice closed the channels.
if err := verifyCloseUpdatesReceived(bobChanSub,
lnrpc.ChannelCloseSummary_REMOTE_FORCE_CLOSE,
lnrpc.ChannelCloseSummary_REMOTE); err != nil {
lnrpc.Initiator_INITIATOR_REMOTE); err != nil {
t.Fatalf("errored verifying close updates: %v", err)
}
@@ -6828,7 +6828,7 @@ func testBasicChannelCreationAndUpdates(net *lntest.NetworkHarness, t *harnessTe
// close initiator because Alice closed the channels.
if err := verifyCloseUpdatesReceived(aliceChanSub,
lnrpc.ChannelCloseSummary_LOCAL_FORCE_CLOSE,
lnrpc.ChannelCloseSummary_LOCAL); err != nil {
lnrpc.Initiator_INITIATOR_LOCAL); err != nil {
t.Fatalf("errored verifying close updates: %v", err)
}
}