multi: change to lnrpc.Channel type due to proto update

This commit is contained in:
Wilmer Paulino 2018-03-13 15:11:30 -04:00
parent 7642bad54f
commit 900cd43768
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F
3 changed files with 10 additions and 10 deletions

@ -818,7 +818,7 @@ func closeAllChannels(ctx *cli.Context) error {
return errors.New("no open channels to close") return errors.New("no open channels to close")
} }
var channelsToClose []*lnrpc.ActiveChannel var channelsToClose []*lnrpc.Channel
switch { switch {
case ctx.Bool("force") && ctx.Bool("inactive_only"): case ctx.Bool("force") && ctx.Bool("inactive_only"):
@ -904,7 +904,7 @@ func closeAllChannels(ctx *cli.Context) error {
// they come. // they come.
resultChan := make(chan result, len(channelsToClose)) resultChan := make(chan result, len(channelsToClose))
for _, channel := range channelsToClose { for _, channel := range channelsToClose {
go func(channel *lnrpc.ActiveChannel) { go func(channel *lnrpc.Channel) {
res := result{} res := result{}
res.RemotePubKey = channel.RemotePubkey res.RemotePubKey = channel.RemotePubkey
res.ChannelPoint = channel.ChannelPoint res.ChannelPoint = channel.ChannelPoint

@ -1471,7 +1471,7 @@ func testChannelForceClosure(net *lntest.NetworkHarness, t *harnessTest) {
// As we'll be querying the state of Carol's channels frequently we'll // As we'll be querying the state of Carol's channels frequently we'll
// create a closure helper function for the purpose. // create a closure helper function for the purpose.
getAliceChanInfo := func() (*lnrpc.ActiveChannel, error) { getAliceChanInfo := func() (*lnrpc.Channel, error) {
req := &lnrpc.ListChannelsRequest{} req := &lnrpc.ListChannelsRequest{}
aliceChannelInfo, err := net.Alice.ListChannels(ctxb, req) aliceChannelInfo, err := net.Alice.ListChannels(ctxb, req)
if err != nil { if err != nil {
@ -3421,7 +3421,7 @@ func testRevokedCloseRetribution(net *lntest.NetworkHarness, t *harnessTest) {
// As we'll be querying the state of bob's channels frequently we'll // As we'll be querying the state of bob's channels frequently we'll
// create a closure helper function for the purpose. // create a closure helper function for the purpose.
getBobChanInfo := func() (*lnrpc.ActiveChannel, error) { getBobChanInfo := func() (*lnrpc.Channel, error) {
req := &lnrpc.ListChannelsRequest{} req := &lnrpc.ListChannelsRequest{}
bobChannelInfo, err := net.Bob.ListChannels(ctxb, req) bobChannelInfo, err := net.Bob.ListChannels(ctxb, req)
if err != nil { if err != nil {
@ -3454,7 +3454,7 @@ func testRevokedCloseRetribution(net *lntest.NetworkHarness, t *harnessTest) {
// Next query for Bob's channel state, as we sent 3 payments of 10k // Next query for Bob's channel state, as we sent 3 payments of 10k
// satoshis each, Bob should now see his balance as being 30k satoshis. // satoshis each, Bob should now see his balance as being 30k satoshis.
var bobChan *lnrpc.ActiveChannel var bobChan *lnrpc.Channel
var predErr error var predErr error
err = lntest.WaitPredicate(func() bool { err = lntest.WaitPredicate(func() bool {
bChan, err := getBobChanInfo() bChan, err := getBobChanInfo()
@ -3670,7 +3670,7 @@ func testRevokedCloseRetributionZeroValueRemoteOutput(net *lntest.NetworkHarness
// As we'll be querying the state of Carols's channels frequently we'll // As we'll be querying the state of Carols's channels frequently we'll
// create a closure helper function for the purpose. // create a closure helper function for the purpose.
getCarolChanInfo := func() (*lnrpc.ActiveChannel, error) { getCarolChanInfo := func() (*lnrpc.Channel, error) {
req := &lnrpc.ListChannelsRequest{} req := &lnrpc.ListChannelsRequest{}
carolChannelInfo, err := carol.ListChannels(ctxb, req) carolChannelInfo, err := carol.ListChannels(ctxb, req)
if err != nil { if err != nil {
@ -3889,7 +3889,7 @@ func testRevokedCloseRetributionRemoteHodl(net *lntest.NetworkHarness,
// As we'll be querying the state of Carol's channels frequently we'll // As we'll be querying the state of Carol's channels frequently we'll
// create a closure helper function for the purpose. // create a closure helper function for the purpose.
getCarolChanInfo := func() (*lnrpc.ActiveChannel, error) { getCarolChanInfo := func() (*lnrpc.Channel, error) {
req := &lnrpc.ListChannelsRequest{} req := &lnrpc.ListChannelsRequest{}
carolChannelInfo, err := carol.ListChannels(ctxb, req) carolChannelInfo, err := carol.ListChannels(ctxb, req)
if err != nil { if err != nil {
@ -4829,7 +4829,7 @@ func testAsyncPayments(net *lntest.NetworkHarness, t *harnessTest) {
// As we'll be querying the channels state frequently we'll // As we'll be querying the channels state frequently we'll
// create a closure helper function for the purpose. // create a closure helper function for the purpose.
getChanInfo := func(node *lntest.HarnessNode) (*lnrpc.ActiveChannel, error) { getChanInfo := func(node *lntest.HarnessNode) (*lnrpc.Channel, error) {
req := &lnrpc.ListChannelsRequest{} req := &lnrpc.ListChannelsRequest{}
channelInfo, err := node.ListChannels(ctxb, req) channelInfo, err := node.ListChannels(ctxb, req)
if err != nil { if err != nil {
@ -5012,7 +5012,7 @@ func testBidirectionalAsyncPayments(net *lntest.NetworkHarness, t *harnessTest)
// As we'll be querying the channels state frequently we'll // As we'll be querying the channels state frequently we'll
// create a closure helper function for the purpose. // create a closure helper function for the purpose.
getChanInfo := func(node *lntest.HarnessNode) (*lnrpc.ActiveChannel, error) { getChanInfo := func(node *lntest.HarnessNode) (*lnrpc.Channel, error) {
req := &lnrpc.ListChannelsRequest{} req := &lnrpc.ListChannelsRequest{}
channelInfo, err := node.ListChannels(ctxb, req) channelInfo, err := node.ListChannels(ctxb, req)
if err != nil { if err != nil {

@ -718,7 +718,7 @@ func (n *NetworkHarness) CloseChannel(ctx context.Context,
// channel, and the other to check if a channel is active or // channel, and the other to check if a channel is active or
// not. // not.
filterChannel := func(node *HarnessNode, filterChannel := func(node *HarnessNode,
op wire.OutPoint) (*lnrpc.ActiveChannel, error) { op wire.OutPoint) (*lnrpc.Channel, error) {
listResp, err := node.ListChannels(ctx, listReq) listResp, err := node.ListChannels(ctx, listReq)
if err != nil { if err != nil {
return nil, err return nil, err