lnd+cmd/lncli: handle ChannelPoint funding txid proto update

Since a ChannelPoint's funding txid can now be get/set as raw bytes or
a string, we first need to check what type it's currently set to before
accessing it.
This commit is contained in:
Wilmer Paulino committed 2018-01-27 22:00:01 -05:00
1 parent 2cfd705a06
commit f674e10a2b
6 files changed
+240 -48

No files matched your search

+5 -1
View File
@@ -633,7 +633,11 @@ func (n *NetworkHarness) CloseChannel(ctx context.Context,
// Create a channel outpoint that we can use to compare to channels
// from the ListChannelsResponse.
fundingTxID, err := chainhash.NewHash(cp.FundingTxid)
txidHash, err := getChanPointFundingTxid(cp)
if err != nil {
return nil, nil, err
}
fundingTxID, err := chainhash.NewHash(txidHash)
if err != nil {
return nil, nil, err
}