Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit a5399ee

Browse files
committed
Upgrade lnd
1 parent 1eaaf7e commit a5399ee

File tree

2 files changed

+62
-25
lines changed

2 files changed

+62
-25
lines changed

assets/rpc.proto

Lines changed: 61 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,7 @@ service Lightning {
249249
/** lncli: `newaddress`
250250
NewAddress creates a new address under control of the local wallet.
251251
*/
252-
rpc NewAddress (NewAddressRequest) returns (NewAddressResponse);
253-
254-
/**
255-
NewWitnessAddress creates a new witness address under control of the local wallet.
256-
*/
257-
rpc NewWitnessAddress (NewWitnessAddressRequest) returns (NewAddressResponse) {
252+
rpc NewAddress (NewAddressRequest) returns (NewAddressResponse) {
258253
option (google.api.http) = {
259254
get: "/v1/newaddress"
260255
};
@@ -389,6 +384,19 @@ service Lightning {
389384
};
390385
}
391386

387+
/** lncli: `abandonchannel`
388+
AbandonChannel removes all channel state from the database except for a
389+
close summary. This method can be used to get rid of permanently unusable
390+
channels due to bugs fixed in newer versions of lnd. Only available
391+
when in debug builds of lnd.
392+
*/
393+
rpc AbandonChannel (AbandonChannelRequest) returns (AbandonChannelResponse) {
394+
option (google.api.http) = {
395+
delete: "/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}"
396+
};
397+
}
398+
399+
392400
/** lncli: `sendpayment`
393401
SendPayment dispatches a bi-directional streaming RPC for sending payments
394402
through the Lightning Network. A single RPC invocation creates a persistent
@@ -443,7 +451,14 @@ service Lightning {
443451

444452
/** lncli: `listinvoices`
445453
ListInvoices returns a list of all the invoices currently stored within the
446-
database. Any active debug invoices are ignored.
454+
database. Any active debug invoices are ignored. It has full support for
455+
paginated responses, allowing users to query for specific invoices through
456+
their add_index. This can be done by using either the first_index_offset or
457+
last_index_offset fields included in the response as the index_offset of the
458+
next request. The reversed flag is set by default in order to paginate
459+
backwards. If you wish to paginate forwards, you must explicitly set the
460+
flag to false. If none of the parameters are specified, then the last 100
461+
invoices will be returned.
447462
*/
448463
rpc ListInvoices (ListInvoiceRequest) returns (ListInvoiceResponse) {
449464
option (google.api.http) = {
@@ -463,7 +478,7 @@ service Lightning {
463478
}
464479

465480
/**
466-
SubscribeInvoices returns a uni-directional stream (sever -> client) for
481+
SubscribeInvoices returns a uni-directional stream (server -> client) for
467482
notifying the client of newly added/settled invoices. The caller can
468483
optionally specify the add_index and/or the settle_index. If the add_index
469484
is specified, then we'll first start by sending add invoice events for all
@@ -636,7 +651,7 @@ message Transaction {
636651
/// The transaction hash
637652
string tx_hash = 1 [ json_name = "tx_hash" ];
638653

639-
/// The transaction ammount, denominated in satoshis
654+
/// The transaction amount, denominated in satoshis
640655
int64 amount = 2 [ json_name = "amount" ];
641656

642657
/// The number of confirmations
@@ -787,7 +802,6 @@ message SendCoinsResponse {
787802
788803
- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)
789804
- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)
790-
- `p2pkh`: Pay to public key hash (`PUBKEY_HASH` = 2)
791805
*/
792806
message NewAddressRequest {
793807
enum AddressType {
@@ -798,10 +812,6 @@ message NewAddressRequest {
798812
/// The address type
799813
AddressType type = 1;
800814
}
801-
802-
message NewWitnessAddressRequest {
803-
}
804-
805815
message NewAddressResponse {
806816
/// The newly generated wallet address
807817
string address = 1 [json_name = "address"];
@@ -984,6 +994,7 @@ message ChannelCloseSummary {
984994
REMOTE_FORCE_CLOSE = 2;
985995
BREACH_CLOSE = 3;
986996
FUNDING_CANCELED = 4;
997+
ABANDONED = 5;
987998
}
988999

9891000
/// Details on how the channel was closed.
@@ -996,6 +1007,7 @@ message ClosedChannelsRequest {
9961007
bool remote_force = 3;
9971008
bool breach = 4;
9981009
bool funding_canceled = 5;
1010+
bool abandoned = 6;
9991011
}
10001012

10011013
message ClosedChannelsResponse {
@@ -1726,14 +1738,19 @@ message ListInvoiceRequest {
17261738
bool pending_only = 1 [json_name = "pending_only"];
17271739

17281740
/**
1729-
The offset in the time series to start at. As each response can only contain
1730-
50k invoices, callers can use this to skip around within a packed time
1731-
series.
1741+
The index of an invoice that will be used as either the start or end of a
1742+
query to determine which invoices should be returned in the response.
17321743
*/
1733-
uint32 index_offset = 4 [json_name = "index_offset"];
1744+
uint64 index_offset = 4 [json_name = "index_offset"];
17341745

17351746
/// The max number of invoices to return in the response to this query.
1736-
uint32 num_max_invoices = 5 [json_name = "num_max_invoices"];
1747+
uint64 num_max_invoices = 5 [json_name = "num_max_invoices"];
1748+
1749+
/**
1750+
If set, the invoices returned will result from seeking backwards from the
1751+
specified index offset. This can be used to paginate backwards.
1752+
*/
1753+
bool reversed = 6 [json_name = "reversed"];
17371754
}
17381755
message ListInvoiceResponse {
17391756
/**
@@ -1743,10 +1760,16 @@ message ListInvoiceResponse {
17431760
repeated Invoice invoices = 1 [json_name = "invoices"];
17441761

17451762
/**
1746-
The index of the last time in the set of returned invoices. Can be used to
1747-
seek further, pagination style.
1763+
The index of the last item in the set of returned invoices. This can be used
1764+
to seek further, pagination style.
1765+
*/
1766+
uint64 last_index_offset = 2 [json_name = "last_index_offset"];
1767+
1768+
/**
1769+
The index of the last item in the set of returned invoices. This can be used
1770+
to seek backwards, pagination style.
17481771
*/
1749-
uint32 last_index_offset = 2 [json_name = "last_index_offset"];
1772+
uint64 first_index_offset = 3 [json_name = "first_index_offset"];
17501773
}
17511774

17521775
message InvoiceSubscription {
@@ -1772,8 +1795,8 @@ message Payment {
17721795
/// The payment hash
17731796
string payment_hash = 1 [json_name = "payment_hash"];
17741797

1775-
/// The value of the payment in satoshis
1776-
int64 value = 2 [json_name = "value"];
1798+
/// Deprecated, use value_sat or value_msat.
1799+
int64 value = 2 [json_name = "value", deprecated = true];
17771800

17781801
/// The date of this payment
17791802
int64 creation_date = 3 [json_name = "creation_date"];
@@ -1786,6 +1809,12 @@ message Payment {
17861809

17871810
/// The payment preimage
17881811
string payment_preimage = 6 [json_name = "payment_preimage"];
1812+
1813+
/// The value of the payment in satoshis
1814+
int64 value_sat = 7 [json_name = "value_sat"];
1815+
1816+
/// The value of the payment in milli-satoshis
1817+
int64 value_msat = 8 [json_name = "value_msat"];
17891818
}
17901819

17911820
message ListPaymentsRequest {
@@ -1802,6 +1831,14 @@ message DeleteAllPaymentsRequest {
18021831
message DeleteAllPaymentsResponse {
18031832
}
18041833

1834+
message AbandonChannelRequest {
1835+
ChannelPoint channel_point = 1;
1836+
}
1837+
1838+
message AbandonChannelResponse {
1839+
}
1840+
1841+
18051842
message DebugLevelRequest {
18061843
bool show = 1;
18071844
string level_spec = 2;

assets/script/install_lnd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# versions
44
GO_TAG=1.10.3
5-
LND_TAG=51d43be1f369c7ec5ae8bc3bb282a45c6a0776ea
5+
LND_TAG=8f2da60dfa994992c1de9a3a7dc0bc4389b39299
66
BTCD_TAG=f899737d7f2764dc13e4d01ff00108ec58f766a9
77

88
# create empty btcd.conf for btcctl

0 commit comments

Comments
 (0)