Commit Graph

762 Commits

Author SHA1 Message Date
Oliver Gugger
5e7b905f19
lnrpc: fix WS close error
Fixes the logged error "WS: error closing upgraded conn: tls: failed to
send closeNotify alert (but connection was closed anyway): write tcp4
<ip>-><ip>: write: connection reset by peer" that is caused by the
client closing the connection on its end.
2021-04-29 10:39:12 +02:00
Oliver Gugger
993167f14e
docs+lnrpc: enable bi-directional WebSockets
The grpc-gateway library that is used to transform REST calls into gRPC
uses a different method for reading a request body stream depending on
whether the RPC is a request-streaming one or not. We can't really find
out what kind of RPC the user is calling at runtime, so we add a new
parameter to the proxy that lists all request-streaming RPC calls.
In any case the client _has_ to send one request message initially to
kick off the request processing. Normally this can just be an empty
message. This can lead to problems if that empty message is not
expected by the gRPC server. But for the currently existing two
client-streaming RPCs this will only trigger a warning
(HTLC interceptor) or be ignored (channel acceptor).
2021-04-29 10:39:12 +02:00
Johan T. Halseth
c4fc72d573
routerrpc+routing: set AMP options for payments specified as AMP in SendPayment 2021-04-27 09:47:23 +02:00
Johan T. Halseth
8f57dcf28f
routerrpc: validate DestFeatures from RPC 2021-04-27 09:47:23 +02:00
Johan T. Halseth
0b9137cdac
lnrpc: add AMP feature bits 2021-04-27 09:47:23 +02:00
Johan T. Halseth
f07c9d002c
routing: use Identifier in place of PaymentHash
Since we want to support AMP payment using a different unique payment
identifier (AMP payments don't go to one specific hash), we change the
nomenclature to be Identifier instead of PaymentHash.
2021-04-27 09:47:23 +02:00
Johan T. Halseth
6104d12cf8
routerrpc: add amp bool to SendPayment
For now this is how you indicate you want to perform an AMP payment to
the destination.
2021-04-27 09:47:23 +02:00
Olaoluwa Osuntokun
bfcaf02f04
Merge pull request #4905 from LN-Zap/feat/spend-unconfirmed-estimate
Support spend_unconfirmed in EstimateFee and FundPsbt
2021-04-26 15:48:11 -07:00
Olaoluwa Osuntokun
d07202d17b
Merge pull request #5212 from wpaulino/wtclient-update-stats-after-backup
wtclient: decrement pending tasks stats upon accepted task
2021-04-22 15:49:11 -07:00
Tom Kirkpatrick
2f80283ec2
rpc: minConfs and spendUnconfirmed for EstimateFee 2021-04-22 20:35:51 +02:00
Tom Kirkpatrick
76706c7473
walletrpc: minConfs and spendUnconfirmed for FundPtsb 2021-04-22 20:35:00 +02:00
whythat
1adeb41a9d rpcserver+lnrpc: make Subscribe RPCs context aware
This commit makes all the Subscribe RCP's context aware so that they
stop executing when the request context is cancelled.
2021-04-22 07:49:29 +02:00
Olaoluwa Osuntokun
60250f0a04
Merge pull request #5034 from Roasbeef/m1-go1.16
build: switch all builds systems and CI/ID to go 1.16, update min go version, add support for compiling M1 binaries
2021-04-21 08:59:46 -07:00
Johan T. Halseth
faf5049848
Merge pull request #4599 from hsjoberg/lndmobile-restart
mobile: re-initialize listeners via RecreateListeners
2021-04-15 08:53:55 +02:00
Wilmer Paulino
7517243d6d
wtclient: decrement pending tasks stats upon accepted task
We'd never decrement the number of pending backups upon a watchtower
accepting one, making it confusing for users to determine whether their
backups have actually been accepted. Along the way, we also rename
NumTasksReceived to NumTasksPending to better reflect its purpose.
2021-04-14 17:18:25 -07:00
carla
db1d671b1a
multi: terminate SubscribeSingleInvoice once completed 2021-04-14 09:19:23 +02:00
Olaoluwa Osuntokun
af0fc09f62
multi: update build systems and CI/CD to go 1.16 2021-04-13 15:57:21 -07:00
Pierre Rochard
99cba51849 rpcserver+lnrpc: make graph node addresses consistent
This commit adds a []*lnrpc.NodeAddress typed node_addresses field
on the NodeUpdate message of SubscribeChannelGraph to mirror the
addresses field in the LightningNode message of DescribeGraph.

Fixes https://github.com/lightningnetwork/lnd/issues/4084
2021-04-09 11:29:22 -05:00
Conner Fromknecht
730b718208
lntest: add AMP itest 2021-04-07 12:09:47 -07:00
Conner Fromknecht
352ce10658
lnrpc: add UnmarshalAMP decoding 2021-04-07 12:09:47 -07:00
Conner Fromknecht
00581efec6
lnrpc: add AMPRecord to Hop 2021-04-07 12:09:43 -07:00
Hampus Sjöberg
af99f70e48 mobile: re-enitialize listeners with RecreateListeners 2021-04-06 15:34:26 +02:00
Johan T. Halseth
d1c7059f14
Merge pull request #5178 from halseth/mobile-docker-prefix
make: pass mobile subserver prefix to docker when generating mobile RPC
2021-04-06 14:54:11 +02:00
Johan T. Halseth
2868b22083
make: pass mobile subserver prefix to docker when generating mobile RPC 2021-04-06 12:52:27 +02:00
Johan T. Halseth
321141600e
mobile/bindings: update API for falafel v0.8.1 2021-04-06 10:49:50 +02:00
Johan T. Halseth
2338a12729
Merge pull request #5172 from hsjoberg/state-small
lnrpc: Change State -> state in SubscribeStateResponse
2021-04-06 10:40:04 +02:00
Wilmer Paulino
cb3e179eaf
rpc: break down wallet balance by accounts 2021-04-05 15:41:12 -07:00
Wilmer Paulino
5301c7e83f
walletrpc: expose wallet import related RPCs 2021-04-05 15:41:10 -07:00
Wilmer Paulino
a7211b34c3
rpc: expose account parameter for several wallet RPCs 2021-04-05 15:41:07 -07:00
Wilmer Paulino
f91e7cde59
lnwallet: expose optional account filter for several WalletController methods 2021-04-05 15:41:06 -07:00
Wilmer Paulino
f38bf4d7fa
lnwallet: expose required account parameter for WalletController methods 2021-04-05 15:41:05 -07:00
Hampus Sjöberg
a7c43fbb03 lnrpc: Change State -> state in SubscribeStateResponse
This is to keep it in-line with the naming convention of the
protobuf response fields.
2021-04-05 15:26:37 +02:00
yyforyongyu
9d0d88ac21
lnrpc+lncli: deprecate sat_per_byte and add sat_per_vbyte
This commit deprecates/replaces the old field `sat_per_byte` with
`sat_per_vbyte`. While the old field suggests sat per byte, it’s
actually using sat per virtual byte. We use the Hidden param to hide all
the deprecated flags. These flags won't show up in help menu onwards,
while stay valid that can be passed from cli. Thus bash scripts
referencing these fields won't be broken.
2021-03-26 17:16:40 +08:00
yyforyongyu
2466758acd
lncli+lnrpc: update docs for sat_per_byte
Update the documentation for the field `sat_per_byte`. While the name
suggests it’s sat per byte, the value is actually in sat per virtual
byte.
2021-03-26 17:09:14 +08:00
Olaoluwa Osuntokun
24d1d9cb14
Merge pull request #5095 from bottlepay/wtxmgr-parameterized-lock
lnwallet+walletrpc: list leases and parameterize duration
2021-03-25 17:31:13 -07:00
Olaoluwa Osuntokun
b4b7f29724
Merge pull request #5102 from yyforyongyu/fix-send-cli
lncli+lnrpc: add payment address to sendpayment
2021-03-24 18:02:53 -07:00
Olaoluwa Osuntokun
901c192e9f
lnrpc/routerrpc: use x prefix as REST sub-path for ImportMissionControl
A small change to better indicate that this is a different class of RPCs
on the REST interface.
2021-03-23 16:41:00 -07:00
carla
d0e7164c07
routerrpc: add mission control import 2021-03-18 10:51:45 +02:00
yyforyongyu
2dac77200b
lncli+lnrpc: add payment address to sendpayment 2021-03-17 21:16:17 +08:00
Johan T. Halseth
9ef556624e
lnrpc: add StateService 2021-03-17 12:09:38 +01:00
Joost Jager
9398220568 walletrpc: add ListLeases 2021-03-13 08:45:52 +01:00
Joost Jager
b8e54fffbf walletrpc: extract leases marshall function 2021-03-13 08:45:52 +01:00
Joost Jager
37331a5ab2 walletrpc: use locked utxo struct from wtxmgr 2021-03-13 08:45:52 +01:00
Joost Jager
927f17be32 walletrpc: parameterize output lease duration 2021-03-13 08:45:52 +01:00
Joost Jager
5ba0f8e355 lnwallet: bump btcwallet 2021-03-13 08:45:52 +01:00
Johan T. Halseth
4ea494e8c5
lnrpc: wrap subservers in GrpcHandler
In order to be able to register the subservers with the root grpc server
before we have all dependencies available, we wrap them in an
GrpcHandler struct. This struct will initially hold an empty reference
to the subservers, which allows us to register with the GRPC server, and
later populate and create the subserver instance.
2021-03-11 13:05:23 +01:00
Olaoluwa Osuntokun
65b0bbcd53
Merge pull request #5033 from robot-dreams/set-channel-status
Add lncli command / RPC for manually setting channel state
2021-03-09 18:12:08 -08:00
Yaacov Akiba Slama
4bab68a808 lnrpc: add timestamp_ns field to ForwardingEvent msg
This allows to use FowardingHistory rpc method to receive the data exactly
as it's stored in lnd and to synchronize incrementally the history to an
external database.
2021-03-05 16:26:28 -08:00
Conner Fromknecht
8c4e32012e
Merge pull request #5070 from alexbosworth/patch-14
trivial: match newline style
2021-03-05 12:30:20 -08:00
Conner Fromknecht
b121d1da4e
Merge pull request #5078 from carlaKC/fix-comment
lnrpc: correct comment on half life seconds
2021-03-05 12:29:59 -08:00