Add support for lnd 0.17.5-beta (#5554)

* Add support for lnd 0.17.5-beta

Switch Lnd fixture back to BitcoindVersion.newest

Fix linux build

Update lnd windows hash

Fix lnd mac intel hash

* Update proto files

* Revert changes that removed mapping for numeric UInt32, UInt64 types

* Fix version
This commit is contained in:
Chris Stewart 2024-04-29 13:04:29 -05:00 committed by GitHub
parent 2102e4d682
commit 819a047d1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 3118 additions and 2578 deletions

View file

@ -19,6 +19,7 @@ Compile / scalacOptions ++= Seq(
"-Wconf:cat=deprecation:site=invoicesrpc\\..*:silent",
"-Wconf:cat=deprecation:site=peersrpc\\..*:silent",
"-Wconf:cat=deprecation:site=chainrpc\\..*:silent",
"-Wconf:cat=deprecation:site=wtclientrpc\\..*:silent",
"-Wconf:cat=unused-imports:site=lnrpc:silent",
"-Wconf:cat=unused-imports:site=signrpc:silent",
"-Wconf:cat=unused-imports:site=walletrpc:silent",
@ -39,7 +40,7 @@ TaskKeys.downloadLnd := {
Files.createDirectories(binaryDir)
}
val version = "0.17.3-beta"
val version = "0.17.5-beta"
val (platform, suffix) =
if (Properties.isLinux) ("linux-amd64", "tar.gz")
@ -74,13 +75,13 @@ TaskKeys.downloadLnd := {
val expectedHash =
if (Properties.isLinux)
"908adc1ae7f0d8b5fd549d1d7956ca5a091a7bed5a03485369f5288dd96e7f54"
"c06d96222990ecb240affba44c92413c26481057d9448657b18b6f0ab6a56d47"
else if (Properties.isMac && System.getProperty("os.arch") == "aarch64")
"e80601787ae4fd7efddab89e7c888f49c155b90c582d680c793dfea287576e39"
"fa88dc3e05605f71ec4a8c1cf608bc3b0d166caa5e0bbe2213e35c62346b31fd"
else if (Properties.isMac)
"8977e316fa62566214080f8340c9f647e8d32559848b6c9e512e10684c2bf0b4"
"71ec034b2e62a6db29c88d941f8e8902fa6070ce45e1b3c22d529313ae5fd0ce"
else if (Properties.isWin)
"bd319ad84f48ff8a92693b10551d5273294991fd463b36eb26431f6bcc09a99b"
"9b6f0ada7910d5beddc44d6eef3a92206d3f7f06c19e9e3dcc412dd6a0d6182d"
else sys.error(s"Unsupported OS: ${Properties.osName}")
val success = hash.equalsIgnoreCase(expectedHash)

View file

@ -0,0 +1,80 @@
syntax = "proto3";
package autopilotrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/autopilotrpc";
// Autopilot is a service that can be used to get information about the current
// state of the daemon's autopilot agent, and also supply it with information
// that can be used when deciding where to open channels.
service Autopilot {
/*
Status returns whether the daemon's autopilot agent is active.
*/
rpc Status (StatusRequest) returns (StatusResponse);
/*
ModifyStatus is used to modify the status of the autopilot agent, like
enabling or disabling it.
*/
rpc ModifyStatus (ModifyStatusRequest) returns (ModifyStatusResponse);
/*
QueryScores queries all available autopilot heuristics, in addition to any
active combination of these heruristics, for the scores they would give to
the given nodes.
*/
rpc QueryScores (QueryScoresRequest) returns (QueryScoresResponse);
/*
SetScores attempts to set the scores used by the running autopilot agent,
if the external scoring heuristic is enabled.
*/
rpc SetScores (SetScoresRequest) returns (SetScoresResponse);
}
message StatusRequest {
}
message StatusResponse {
// Indicates whether the autopilot is active or not.
bool active = 1;
}
message ModifyStatusRequest {
// Whether the autopilot agent should be enabled or not.
bool enable = 1;
}
message ModifyStatusResponse {
}
message QueryScoresRequest {
repeated string pubkeys = 1;
// If set, we will ignore the local channel state when calculating scores.
bool ignore_local_state = 2;
}
message QueryScoresResponse {
message HeuristicResult {
string heuristic = 1;
map<string, double> scores = 2;
}
repeated HeuristicResult results = 1;
}
message SetScoresRequest {
// The name of the heuristic to provide scores to.
string heuristic = 1;
/*
A map from hex-encoded public keys to scores. Scores must be in the range
[0.0, 1.0].
*/
map<string, double> scores = 2;
}
message SetScoresResponse {
}

View file

@ -0,0 +1,74 @@
syntax = "proto3";
package chainrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/chainrpc";
// ChainKit is a service that can be used to get information from the
// chain backend.
service ChainKit {
/* lncli: `chain getblock`
GetBlock returns a block given the corresponding block hash.
*/
rpc GetBlock (GetBlockRequest) returns (GetBlockResponse);
/* lncli: `chain getblockheader`
GetBlockHeader returns a block header with a particular block hash.
*/
rpc GetBlockHeader (GetBlockHeaderRequest) returns (GetBlockHeaderResponse);
/* lncli: `chain getbestblock`
GetBestBlock returns the block hash and current height from the valid
most-work chain.
*/
rpc GetBestBlock (GetBestBlockRequest) returns (GetBestBlockResponse);
/* lncli: `chain getblockhash`
GetBlockHash returns the hash of the block in the best blockchain
at the given height.
*/
rpc GetBlockHash (GetBlockHashRequest) returns (GetBlockHashResponse);
}
message GetBlockRequest {
// The hash of the requested block.
bytes block_hash = 1;
}
// TODO(ffranr): The neutrino GetBlock response includes many
// additional helpful fields. Consider adding them here also.
message GetBlockResponse {
// The raw bytes of the requested block.
bytes raw_block = 1;
}
message GetBlockHeaderRequest {
// The hash of the block with the requested header.
bytes block_hash = 1;
}
message GetBlockHeaderResponse {
// The header of the block with the requested hash.
bytes raw_block_header = 1;
}
message GetBestBlockRequest {
}
message GetBestBlockResponse {
// The hash of the best block.
bytes block_hash = 1;
// The height of the best block.
int32 block_height = 2;
}
message GetBlockHashRequest {
// Block height of the target best chain block.
int64 block_height = 1;
}
message GetBlockHashResponse {
// The hash of the best block at the specified height.
bytes block_hash = 1;
}

View file

@ -4,219 +4,197 @@ package chainrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/chainrpc";
import "scalapb/scalapb.proto";
option (scalapb.options) = {
import: "org.bitcoins.lnd.rpc.LndUtils._"
scope: PACKAGE
field_transformations : [
{
when : {
type: TYPE_UINT64
}
set : {[scalapb.field] {type : 'org.bitcoins.core.number.UInt64' }}
},
{
when : {
type: TYPE_UINT32
}
set : {[scalapb.field] {type : 'org.bitcoins.core.number.UInt32' }}
}
]
};
// ChainNotifier is a service that can be used to get information about the
// chain backend by registering notifiers for chain events.
service ChainNotifier {
/*
RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
registers an intent for a client to be notified once a confirmation request
has reached its required number of confirmations on-chain.
/*
RegisterConfirmationsNtfn is a synchronous response-streaming RPC that
registers an intent for a client to be notified once a confirmation request
has reached its required number of confirmations on-chain.
A confirmation request must have a valid output script. It is also possible
to give a transaction ID. If the transaction ID is not set, a notification
is sent once the output script confirms. If the transaction ID is also set,
a notification is sent once the output script confirms in the given
transaction.
*/
rpc RegisterConfirmationsNtfn (ConfRequest) returns (stream ConfEvent);
A confirmation request must have a valid output script. It is also possible
to give a transaction ID. If the transaction ID is not set, a notification
is sent once the output script confirms. If the transaction ID is also set,
a notification is sent once the output script confirms in the given
transaction.
*/
rpc RegisterConfirmationsNtfn (ConfRequest) returns (stream ConfEvent);
/*
RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
intent for a client to be notification once a spend request has been spent
by a transaction that has confirmed on-chain.
/*
RegisterSpendNtfn is a synchronous response-streaming RPC that registers an
intent for a client to be notification once a spend request has been spent
by a transaction that has confirmed on-chain.
A client can specify whether the spend request should be for a particular
outpoint or for an output script by specifying a zero outpoint.
*/
rpc RegisterSpendNtfn (SpendRequest) returns (stream SpendEvent);
A client can specify whether the spend request should be for a particular
outpoint or for an output script by specifying a zero outpoint.
*/
rpc RegisterSpendNtfn (SpendRequest) returns (stream SpendEvent);
/*
RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
registers an intent for a client to be notified of blocks in the chain. The
stream will return a hash and height tuple of a block for each new/stale
block in the chain. It is the client's responsibility to determine whether
the tuple returned is for a new or stale block in the chain.
/*
RegisterBlockEpochNtfn is a synchronous response-streaming RPC that
registers an intent for a client to be notified of blocks in the chain. The
stream will return a hash and height tuple of a block for each new/stale
block in the chain. It is the client's responsibility to determine whether
the tuple returned is for a new or stale block in the chain.
A client can also request a historical backlog of blocks from a particular
point. This allows clients to be idempotent by ensuring that they do not
missing processing a single block within the chain.
*/
rpc RegisterBlockEpochNtfn (BlockEpoch) returns (stream BlockEpoch);
A client can also request a historical backlog of blocks from a particular
point. This allows clients to be idempotent by ensuring that they do not
missing processing a single block within the chain.
*/
rpc RegisterBlockEpochNtfn (BlockEpoch) returns (stream BlockEpoch);
}
message ConfRequest {
/*
The transaction hash for which we should request a confirmation notification
for. If set to a hash of all zeros, then the confirmation notification will
be requested for the script instead.
*/
bytes txid = 1;
/*
The transaction hash for which we should request a confirmation notification
for. If set to a hash of all zeros, then the confirmation notification will
be requested for the script instead.
*/
bytes txid = 1;
/*
An output script within a transaction with the hash above which will be used
by light clients to match block filters. If the transaction hash is set to a
hash of all zeros, then a confirmation notification will be requested for
this script instead.
*/
bytes script = 2;
/*
An output script within a transaction with the hash above which will be used
by light clients to match block filters. If the transaction hash is set to a
hash of all zeros, then a confirmation notification will be requested for
this script instead.
*/
bytes script = 2;
/*
The number of desired confirmations the transaction/output script should
reach before dispatching a confirmation notification.
*/
uint32 num_confs = 3;
/*
The number of desired confirmations the transaction/output script should
reach before dispatching a confirmation notification.
*/
uint32 num_confs = 3;
/*
The earliest height in the chain for which the transaction/output script
could have been included in a block. This should in most cases be set to the
broadcast height of the transaction/output script.
*/
uint32 height_hint = 4;
/*
The earliest height in the chain for which the transaction/output script
could have been included in a block. This should in most cases be set to the
broadcast height of the transaction/output script.
*/
uint32 height_hint = 4;
/*
If true, then the block that mines the specified txid/script will be
included in eventual the notification event.
*/
bool include_block = 5;
/*
If true, then the block that mines the specified txid/script will be
included in eventual the notification event.
*/
bool include_block = 5;
}
message ConfDetails {
// The raw bytes of the confirmed transaction.
bytes raw_tx = 1;
// The raw bytes of the confirmed transaction.
bytes raw_tx = 1;
// The hash of the block in which the confirmed transaction was included in.
bytes block_hash = 2;
// The hash of the block in which the confirmed transaction was included in.
bytes block_hash = 2;
// The height of the block in which the confirmed transaction was included
// in.
uint32 block_height = 3;
// The height of the block in which the confirmed transaction was included
// in.
uint32 block_height = 3;
// The index of the confirmed transaction within the block.
uint32 tx_index = 4;
// The index of the confirmed transaction within the block.
uint32 tx_index = 4;
/*
The raw bytes of the block that mined the transaction. Only included if
include_block was set in the request.
*/
bytes raw_block = 5;
/*
The raw bytes of the block that mined the transaction. Only included if
include_block was set in the request.
*/
bytes raw_block = 5;
}
message Reorg {
// TODO(wilmer): need to know how the client will use this first.
// TODO(wilmer): need to know how the client will use this first.
}
message ConfEvent {
oneof event {
/*
An event that includes the confirmation details of the request
(txid/ouput script).
*/
ConfDetails conf = 1;
oneof event {
/*
An event that includes the confirmation details of the request
(txid/ouput script).
*/
ConfDetails conf = 1;
/*
An event send when the transaction of the request is reorged out of the
chain.
*/
Reorg reorg = 2;
}
/*
An event send when the transaction of the request is reorged out of the
chain.
*/
Reorg reorg = 2;
}
}
message Outpoint {
// The hash of the transaction.
bytes hash = 1;
// The hash of the transaction.
bytes hash = 1;
// The index of the output within the transaction.
uint32 index = 2;
// The index of the output within the transaction.
uint32 index = 2;
}
message SpendRequest {
/*
The outpoint for which we should request a spend notification for. If set to
a zero outpoint, then the spend notification will be requested for the
script instead. A zero or nil outpoint is not supported for Taproot spends
because the output script cannot reliably be computed from the witness alone
and the spent output script is not always available in the rescan context.
So an outpoint must _always_ be specified when registering a spend
notification for a Taproot output.
*/
Outpoint outpoint = 1;
/*
The outpoint for which we should request a spend notification for. If set to
a zero outpoint, then the spend notification will be requested for the
script instead. A zero or nil outpoint is not supported for Taproot spends
because the output script cannot reliably be computed from the witness alone
and the spent output script is not always available in the rescan context.
So an outpoint must _always_ be specified when registering a spend
notification for a Taproot output.
*/
Outpoint outpoint = 1;
/*
The output script for the outpoint above. This will be used by light clients
to match block filters. If the outpoint is set to a zero outpoint, then a
spend notification will be requested for this script instead.
*/
bytes script = 2;
/*
The output script for the outpoint above. This will be used by light clients
to match block filters. If the outpoint is set to a zero outpoint, then a
spend notification will be requested for this script instead.
*/
bytes script = 2;
/*
The earliest height in the chain for which the outpoint/output script could
have been spent. This should in most cases be set to the broadcast height of
the outpoint/output script.
*/
uint32 height_hint = 3;
/*
The earliest height in the chain for which the outpoint/output script could
have been spent. This should in most cases be set to the broadcast height of
the outpoint/output script.
*/
uint32 height_hint = 3;
// TODO(wilmer): extend to support num confs on spending tx.
// TODO(wilmer): extend to support num confs on spending tx.
}
message SpendDetails {
// The outpoint was that spent.
Outpoint spending_outpoint = 1;
// The outpoint was that spent.
Outpoint spending_outpoint = 1;
// The raw bytes of the spending transaction.
bytes raw_spending_tx = 2;
// The raw bytes of the spending transaction.
bytes raw_spending_tx = 2;
// The hash of the spending transaction.
bytes spending_tx_hash = 3;
// The hash of the spending transaction.
bytes spending_tx_hash = 3;
// The input of the spending transaction that fulfilled the spend request.
uint32 spending_input_index = 4;
// The input of the spending transaction that fulfilled the spend request.
uint32 spending_input_index = 4;
// The height at which the spending transaction was included in a block.
uint32 spending_height = 5;
// The height at which the spending transaction was included in a block.
uint32 spending_height = 5;
}
message SpendEvent {
oneof event {
/*
An event that includes the details of the spending transaction of the
request (outpoint/output script).
*/
SpendDetails spend = 1;
oneof event {
/*
An event that includes the details of the spending transaction of the
request (outpoint/output script).
*/
SpendDetails spend = 1;
/*
An event sent when the spending transaction of the request was
reorged out of the chain.
*/
Reorg reorg = 2;
}
/*
An event sent when the spending transaction of the request was
reorged out of the chain.
*/
Reorg reorg = 2;
}
}
message BlockEpoch {
// The hash of the block.
bytes hash = 1;
// The hash of the block.
bytes hash = 1;
// The height of the block.
uint32 height = 2;
// The height of the block.
uint32 height = 2;
}

View file

@ -0,0 +1,18 @@
syntax = "proto3";
import "lightning.proto";
package devrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/devrpc";
service Dev {
/*
ImportGraph imports a ChannelGraph into the graph database. Should only be
used for development.
*/
rpc ImportGraph (lnrpc.ChannelGraph) returns (ImportGraphResponse);
}
message ImportGraphResponse {
}

View file

@ -6,191 +6,170 @@ package invoicesrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/invoicesrpc";
import "scalapb/scalapb.proto";
option (scalapb.options) = {
import: "org.bitcoins.lnd.rpc.LndUtils._"
scope: PACKAGE
field_transformations : [
{
when : {
type: TYPE_UINT64
}
set : {[scalapb.field] {type : 'org.bitcoins.core.number.UInt64' }}
},
{
when : {
type: TYPE_UINT32
}
set : {[scalapb.field] {type : 'org.bitcoins.core.number.UInt32' }}
}
]
};
// Invoices is a service that can be used to create, accept, settle and cancel
// invoices.
service Invoices {
/*
SubscribeSingleInvoice returns a uni-directional stream (server -> client)
to notify the client of state transitions of the specified invoice.
Initially the current invoice state is always sent out.
*/
rpc SubscribeSingleInvoice (SubscribeSingleInvoiceRequest)
returns (stream lnrpc.Invoice);
/*
SubscribeSingleInvoice returns a uni-directional stream (server -> client)
to notify the client of state transitions of the specified invoice.
Initially the current invoice state is always sent out.
*/
rpc SubscribeSingleInvoice (SubscribeSingleInvoiceRequest)
returns (stream lnrpc.Invoice);
/*
CancelInvoice cancels a currently open invoice. If the invoice is already
canceled, this call will succeed. If the invoice is already settled, it will
fail.
*/
rpc CancelInvoice (CancelInvoiceMsg) returns (CancelInvoiceResp);
/*
CancelInvoice cancels a currently open invoice. If the invoice is already
canceled, this call will succeed. If the invoice is already settled, it will
fail.
*/
rpc CancelInvoice (CancelInvoiceMsg) returns (CancelInvoiceResp);
/*
AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
supplied in the request.
*/
rpc AddHoldInvoice (AddHoldInvoiceRequest) returns (AddHoldInvoiceResp);
/*
AddHoldInvoice creates a hold invoice. It ties the invoice to the hash
supplied in the request.
*/
rpc AddHoldInvoice (AddHoldInvoiceRequest) returns (AddHoldInvoiceResp);
/*
SettleInvoice settles an accepted invoice. If the invoice is already
settled, this call will succeed.
*/
rpc SettleInvoice (SettleInvoiceMsg) returns (SettleInvoiceResp);
/*
SettleInvoice settles an accepted invoice. If the invoice is already
settled, this call will succeed.
*/
rpc SettleInvoice (SettleInvoiceMsg) returns (SettleInvoiceResp);
/*
LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
using either its payment hash, payment address, or set ID.
*/
rpc LookupInvoiceV2 (LookupInvoiceMsg) returns (lnrpc.Invoice);
/*
LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
using either its payment hash, payment address, or set ID.
*/
rpc LookupInvoiceV2 (LookupInvoiceMsg) returns (lnrpc.Invoice);
}
message CancelInvoiceMsg {
// Hash corresponding to the (hold) invoice to cancel. When using
// REST, this field must be encoded as base64.
bytes payment_hash = 1;
// Hash corresponding to the (hold) invoice to cancel. When using
// REST, this field must be encoded as base64.
bytes payment_hash = 1;
}
message CancelInvoiceResp {
}
message AddHoldInvoiceRequest {
/*
An optional memo to attach along with the invoice. Used for record keeping
purposes for the invoice's creator, and will also be set in the description
field of the encoded payment request if the description_hash field is not
being used.
*/
string memo = 1;
/*
An optional memo to attach along with the invoice. Used for record keeping
purposes for the invoice's creator, and will also be set in the description
field of the encoded payment request if the description_hash field is not
being used.
*/
string memo = 1;
// The hash of the preimage
bytes hash = 2;
// The hash of the preimage
bytes hash = 2;
/*
The value of this invoice in satoshis
/*
The value of this invoice in satoshis
The fields value and value_msat are mutually exclusive.
*/
int64 value = 3;
The fields value and value_msat are mutually exclusive.
*/
int64 value = 3;
/*
The value of this invoice in millisatoshis
/*
The value of this invoice in millisatoshis
The fields value and value_msat are mutually exclusive.
*/
int64 value_msat = 10;
The fields value and value_msat are mutually exclusive.
*/
int64 value_msat = 10;
/*
Hash (SHA-256) of a description of the payment. Used if the description of
payment (memo) is too long to naturally fit within the description field
of an encoded payment request.
*/
bytes description_hash = 4;
/*
Hash (SHA-256) of a description of the payment. Used if the description of
payment (memo) is too long to naturally fit within the description field
of an encoded payment request.
*/
bytes description_hash = 4;
// Payment request expiry time in seconds. Default is 86400 (24 hours).
int64 expiry = 5;
// Payment request expiry time in seconds. Default is 86400 (24 hours).
int64 expiry = 5;
// Fallback on-chain address.
string fallback_addr = 6;
// Fallback on-chain address.
string fallback_addr = 6;
// Delta to use for the time-lock of the CLTV extended to the final hop.
uint64 cltv_expiry = 7;
// Delta to use for the time-lock of the CLTV extended to the final hop.
uint64 cltv_expiry = 7;
/*
Route hints that can each be individually used to assist in reaching the
invoice's destination.
*/
repeated lnrpc.RouteHint route_hints = 8;
/*
Route hints that can each be individually used to assist in reaching the
invoice's destination.
*/
repeated lnrpc.RouteHint route_hints = 8;
// Whether this invoice should include routing hints for private channels.
bool private = 9;
// Whether this invoice should include routing hints for private channels.
bool private = 9;
}
message AddHoldInvoiceResp {
/*
A bare-bones invoice for a payment within the Lightning Network. With the
details of the invoice, the sender has all the data necessary to send a
payment to the recipient.
*/
string payment_request = 1;
/*
A bare-bones invoice for a payment within the Lightning Network. With the
details of the invoice, the sender has all the data necessary to send a
payment to the recipient.
*/
string payment_request = 1;
/*
The "add" index of this invoice. Each newly created invoice will increment
this index making it monotonically increasing. Callers to the
SubscribeInvoices call can use this to instantly get notified of all added
invoices with an add_index greater than this one.
*/
uint64 add_index = 2;
/*
The "add" index of this invoice. Each newly created invoice will increment
this index making it monotonically increasing. Callers to the
SubscribeInvoices call can use this to instantly get notified of all added
invoices with an add_index greater than this one.
*/
uint64 add_index = 2;
/*
The payment address of the generated invoice. This value should be used
in all payments for this invoice as we require it for end to end
security.
*/
bytes payment_addr = 3;
/*
The payment address of the generated invoice. This value should be used
in all payments for this invoice as we require it for end to end
security.
*/
bytes payment_addr = 3;
}
message SettleInvoiceMsg {
// Externally discovered pre-image that should be used to settle the hold
// invoice.
bytes preimage = 1;
// Externally discovered pre-image that should be used to settle the hold
// invoice.
bytes preimage = 1;
}
message SettleInvoiceResp {
}
message SubscribeSingleInvoiceRequest {
reserved 1;
reserved 1;
// Hash corresponding to the (hold) invoice to subscribe to. When using
// REST, this field must be encoded as base64url.
bytes r_hash = 2;
// Hash corresponding to the (hold) invoice to subscribe to. When using
// REST, this field must be encoded as base64url.
bytes r_hash = 2;
}
enum LookupModifier {
// The default look up modifier, no look up behavior is changed.
DEFAULT = 0;
// The default look up modifier, no look up behavior is changed.
DEFAULT = 0;
/*
Indicates that when a look up is done based on a set_id, then only that set
of HTLCs related to that set ID should be returned.
*/
HTLC_SET_ONLY = 1;
/*
Indicates that when a look up is done based on a set_id, then only that set
of HTLCs related to that set ID should be returned.
*/
HTLC_SET_ONLY = 1;
/*
Indicates that when a look up is done using a payment_addr, then no HTLCs
related to the payment_addr should be returned. This is useful when one
wants to be able to obtain the set of associated setIDs with a given
invoice, then look up the sub-invoices "projected" by that set ID.
*/
HTLC_SET_BLANK = 2;
/*
Indicates that when a look up is done using a payment_addr, then no HTLCs
related to the payment_addr should be returned. This is useful when one
wants to be able to obtain the set of associated setIDs with a given
invoice, then look up the sub-invoices "projected" by that set ID.
*/
HTLC_SET_BLANK = 2;
}
message LookupInvoiceMsg {
oneof invoice_ref {
// When using REST, this field must be encoded as base64.
bytes payment_hash = 1;
bytes payment_addr = 2;
bytes set_id = 3;
}
oneof invoice_ref {
// When using REST, this field must be encoded as base64.
bytes payment_hash = 1;
bytes payment_addr = 2;
bytes set_id = 3;
}
LookupModifier lookup_modifier = 4;
LookupModifier lookup_modifier = 4;
}

View file

@ -0,0 +1,228 @@
syntax = "proto3";
package neutrinorpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/neutrinorpc";
// NeutrinoKit is a service that can be used to get information about the
// current state of the neutrino instance, fetch blocks and add/remove peers.
service NeutrinoKit {
/*
Status returns the status of the light client neutrino instance,
along with height and hash of the best block, and a list of connected
peers.
*/
rpc Status (StatusRequest) returns (StatusResponse);
/*
AddPeer adds a new peer that has already been connected to the server.
*/
rpc AddPeer (AddPeerRequest) returns (AddPeerResponse);
/*
DisconnectPeer disconnects a peer by target address. Both outbound and
inbound nodes will be searched for the target node. An error message will
be returned if the peer was not found.
*/
rpc DisconnectPeer (DisconnectPeerRequest) returns (DisconnectPeerResponse);
/*
IsBanned returns true if the peer is banned, otherwise false.
*/
rpc IsBanned (IsBannedRequest) returns (IsBannedResponse);
/*
GetBlockHeader returns a block header with a particular block hash.
*/
rpc GetBlockHeader (GetBlockHeaderRequest) returns (GetBlockHeaderResponse);
/*
GetBlock returns a block with a particular block hash.
*/
rpc GetBlock (GetBlockRequest) returns (GetBlockResponse);
/*
GetCFilter returns a compact filter from a block.
*/
rpc GetCFilter (GetCFilterRequest) returns (GetCFilterResponse);
/*
Deprecated, use chainrpc.GetBlockHash instead.
GetBlockHash returns the header hash of a block at a given height.
*/
rpc GetBlockHash (GetBlockHashRequest) returns (GetBlockHashResponse) {
option deprecated = true;
}
}
message StatusRequest {
}
message StatusResponse {
// Indicates whether the neutrino backend is active or not.
bool active = 1;
// Is fully synced.
bool synced = 2;
// Best block height.
int32 block_height = 3;
// Best block hash.
string block_hash = 4;
// Connected peers.
repeated string peers = 5;
}
message AddPeerRequest {
// Peer to add.
string peer_addrs = 1;
}
message AddPeerResponse {
}
message DisconnectPeerRequest {
// Peer to disconnect.
string peer_addrs = 1;
}
message DisconnectPeerResponse {
}
message IsBannedRequest {
// Peer to lookup.
string peer_addrs = 1;
}
message IsBannedResponse {
bool banned = 1;
}
message GetBlockHeaderRequest {
// Block hash in hex notation.
string hash = 1;
}
message GetBlockHeaderResponse {
// The block hash (same as provided).
string hash = 1;
// The number of confirmations.
int64 confirmations = 2;
// The block size excluding witness data.
int64 stripped_size = 3;
// The block size (bytes).
int64 size = 4;
// The block weight as defined in BIP 141.
int64 weight = 5;
// The block height or index.
int32 height = 6;
// The block version.
int32 version = 7;
// The block version.
string version_hex = 8;
// The merkle root.
string merkleroot = 9;
// The block time in seconds since epoch (Jan 1 1970 GMT).
int64 time = 10;
// The nonce.
uint32 nonce = 11;
// The bits in hex notation.
string bits = 12;
// The number of transactions in the block.
int32 ntx = 13;
// The hash of the previous block.
string previous_block_hash = 14;
// The raw hex of the block.
bytes raw_hex = 15;
}
message GetBlockRequest {
// Block hash in hex notation.
string hash = 1;
}
message GetBlockResponse {
// The block hash (same as provided).
string hash = 1;
// The number of confirmations.
int64 confirmations = 2;
// The block size excluding witness data.
int64 stripped_size = 3;
// The block size (bytes).
int64 size = 4;
// The block weight as defined in BIP 141.
int64 weight = 5;
// The block height or index.
int32 height = 6;
// The block version.
int32 version = 7;
// The block version.
string version_hex = 8;
// The merkle root.
string merkleroot = 9;
// List of transaction ids.
repeated string tx = 10;
// The block time in seconds since epoch (Jan 1 1970 GMT).
int64 time = 11;
// The nonce.
uint32 nonce = 12;
// The bits in hex notation.
string bits = 13;
// The number of transactions in the block.
int32 ntx = 14;
// The hash of the previous block.
string previous_block_hash = 15;
// The raw hex of the block.
bytes raw_hex = 16;
}
message GetCFilterRequest {
// Block hash in hex notation.
string hash = 1;
}
message GetCFilterResponse {
// GCS filter.
bytes filter = 1;
}
message GetBlockHashRequest {
// The block height or index.
int32 height = 1;
}
message GetBlockHashResponse {
// The block hash.
string hash = 1;
}

View file

@ -6,110 +6,89 @@ package peersrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/peersrpc";
import "scalapb/scalapb.proto";
option (scalapb.options) = {
import: "org.bitcoins.lnd.rpc.LndUtils._"
scope: PACKAGE
field_transformations : [
{
when : {
type: TYPE_UINT64
}
set : {[scalapb.field] {type : 'org.bitcoins.core.number.UInt64' }}
},
{
when : {
type: TYPE_UINT32
}
set : {[scalapb.field] {type : 'org.bitcoins.core.number.UInt32' }}
}
]
};
// Peers is a service that can be used to get information and interact
// with the other nodes of the network.
service Peers {
/* lncli: peers updatenodeannouncement
UpdateNodeAnnouncement allows the caller to update the node parameters
and broadcasts a new version of the node announcement to its peers.
*/
rpc UpdateNodeAnnouncement (NodeAnnouncementUpdateRequest)
returns (NodeAnnouncementUpdateResponse);
/* lncli: peers updatenodeannouncement
UpdateNodeAnnouncement allows the caller to update the node parameters
and broadcasts a new version of the node announcement to its peers.
*/
rpc UpdateNodeAnnouncement (NodeAnnouncementUpdateRequest)
returns (NodeAnnouncementUpdateResponse);
}
// UpdateAction is used to determine the kind of action we are referring to.
enum UpdateAction {
// ADD indicates this is an "insertion" kind of action.
ADD = 0;
// ADD indicates this is an "insertion" kind of action.
ADD = 0;
// REMOVE indicates this is a "deletion" kind of action.
REMOVE = 1;
// REMOVE indicates this is a "deletion" kind of action.
REMOVE = 1;
}
enum FeatureSet {
/*
SET_INIT identifies features that should be sent in an Init message to
a remote peer.
*/
SET_INIT = 0;
/*
SET_INIT identifies features that should be sent in an Init message to
a remote peer.
*/
SET_INIT = 0;
/*
SET_LEGACY_GLOBAL identifies features that should be set in the legacy
GlobalFeatures field of an Init message, which maintains backwards
compatibility with nodes that haven't implemented flat features.
*/
SET_LEGACY_GLOBAL = 1;
/*
SET_LEGACY_GLOBAL identifies features that should be set in the legacy
GlobalFeatures field of an Init message, which maintains backwards
compatibility with nodes that haven't implemented flat features.
*/
SET_LEGACY_GLOBAL = 1;
/*
SET_NODE_ANN identifies features that should be advertised on node
announcements.
*/
SET_NODE_ANN = 2;
/*
SET_NODE_ANN identifies features that should be advertised on node
announcements.
*/
SET_NODE_ANN = 2;
/*
SET_INVOICE identifies features that should be advertised on invoices
generated by the daemon.
*/
SET_INVOICE = 3;
/*
SET_INVOICE identifies features that should be advertised on invoices
generated by the daemon.
*/
SET_INVOICE = 3;
/*
SET_INVOICE_AMP identifies the features that should be advertised on
AMP invoices generated by the daemon.
*/
SET_INVOICE_AMP = 4;
/*
SET_INVOICE_AMP identifies the features that should be advertised on
AMP invoices generated by the daemon.
*/
SET_INVOICE_AMP = 4;
}
message UpdateAddressAction {
// Determines the kind of action.
UpdateAction action = 1;
// Determines the kind of action.
UpdateAction action = 1;
// The address used to apply the update action.
string address = 2;
// The address used to apply the update action.
string address = 2;
}
message UpdateFeatureAction {
// Determines the kind of action.
UpdateAction action = 1;
// Determines the kind of action.
UpdateAction action = 1;
// The feature bit used to apply the update action.
lnrpc.FeatureBit feature_bit = 2;
// The feature bit used to apply the update action.
lnrpc.FeatureBit feature_bit = 2;
}
message NodeAnnouncementUpdateRequest {
// Set of changes for the features that the node supports.
repeated UpdateFeatureAction feature_updates = 1;
// Set of changes for the features that the node supports.
repeated UpdateFeatureAction feature_updates = 1;
// Color is the node's color in hex code format.
string color = 2;
// Color is the node's color in hex code format.
string color = 2;
// Alias or nick name of the node.
string alias = 3;
// Alias or nick name of the node.
string alias = 3;
// Set of changes for the node's known addresses.
repeated UpdateAddressAction address_updates = 4;
// Set of changes for the node's known addresses.
repeated UpdateAddressAction address_updates = 4;
}
message NodeAnnouncementUpdateResponse {
repeated lnrpc.Op ops = 1;
repeated lnrpc.Op ops = 1;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -7,41 +7,41 @@ option go_package = "github.com/lightningnetwork/lnd/lnrpc/verrpc";
// Versioner is a service that can be used to get information about the version
// and build information of the running daemon.
service Versioner {
/* lncli: `version`
GetVersion returns the current version and build information of the running
daemon.
*/
rpc GetVersion (VersionRequest) returns (Version);
/* lncli: `version`
GetVersion returns the current version and build information of the running
daemon.
*/
rpc GetVersion (VersionRequest) returns (Version);
}
message VersionRequest {
}
message Version {
// A verbose description of the daemon's commit.
string commit = 1;
// A verbose description of the daemon's commit.
string commit = 1;
// The SHA1 commit hash that the daemon is compiled with.
string commit_hash = 2;
// The SHA1 commit hash that the daemon is compiled with.
string commit_hash = 2;
// The semantic version.
string version = 3;
// The semantic version.
string version = 3;
// The major application version.
uint32 app_major = 4;
// The major application version.
uint32 app_major = 4;
// The minor application version.
uint32 app_minor = 5;
// The minor application version.
uint32 app_minor = 5;
// The application patch number.
uint32 app_patch = 6;
// The application patch number.
uint32 app_patch = 6;
// The application pre-release modifier, possibly empty.
string app_pre_release = 7;
// The application pre-release modifier, possibly empty.
string app_pre_release = 7;
// The list of build tags that were supplied during compilation.
repeated string build_tags = 8;
// The list of build tags that were supplied during compilation.
repeated string build_tags = 8;
// The version of go that compiled the executable.
string go_version = 9;
// The version of go that compiled the executable.
string go_version = 9;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,30 @@
syntax = "proto3";
package watchtowerrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc";
// Watchtower is a service that grants access to the watchtower server
// functionality of the daemon.
service Watchtower {
/* lncli: tower info
GetInfo returns general information concerning the companion watchtower
including its public key and URIs where the server is currently
listening for clients.
*/
rpc GetInfo (GetInfoRequest) returns (GetInfoResponse);
}
message GetInfoRequest {
}
message GetInfoResponse {
// The public key of the watchtower.
bytes pubkey = 1;
// The listening addresses of the watchtower.
repeated string listeners = 2;
// The URIs of the watchtower.
repeated string uris = 3;
}

View file

@ -0,0 +1,224 @@
syntax = "proto3";
package wtclientrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/wtclientrpc";
// WatchtowerClient is a service that grants access to the watchtower client
// functionality of the daemon.
service WatchtowerClient {
/*
AddTower adds a new watchtower reachable at the given address and
considers it for new sessions. If the watchtower already exists, then
any new addresses included will be considered when dialing it for
session negotiations and backups.
*/
rpc AddTower (AddTowerRequest) returns (AddTowerResponse);
/*
RemoveTower removes a watchtower from being considered for future session
negotiations and from being used for any subsequent backups until it's added
again. If an address is provided, then this RPC only serves as a way of
removing the address from the watchtower instead.
*/
rpc RemoveTower (RemoveTowerRequest) returns (RemoveTowerResponse);
// ListTowers returns the list of watchtowers registered with the client.
rpc ListTowers (ListTowersRequest) returns (ListTowersResponse);
// GetTowerInfo retrieves information for a registered watchtower.
rpc GetTowerInfo (GetTowerInfoRequest) returns (Tower);
// Stats returns the in-memory statistics of the client since startup.
rpc Stats (StatsRequest) returns (StatsResponse);
// Policy returns the active watchtower client policy configuration.
rpc Policy (PolicyRequest) returns (PolicyResponse);
}
message AddTowerRequest {
// The identifying public key of the watchtower to add.
bytes pubkey = 1;
// A network address the watchtower is reachable over.
string address = 2;
}
message AddTowerResponse {
}
message RemoveTowerRequest {
// The identifying public key of the watchtower to remove.
bytes pubkey = 1;
/*
If set, then the record for this address will be removed, indicating that is
is stale. Otherwise, the watchtower will no longer be used for future
session negotiations and backups.
*/
string address = 2;
}
message RemoveTowerResponse {
}
message GetTowerInfoRequest {
// The identifying public key of the watchtower to retrieve information for.
bytes pubkey = 1;
// Whether we should include sessions with the watchtower in the response.
bool include_sessions = 2;
// Whether to exclude exhausted sessions in the response info. This option
// is only meaningful if include_sessions is true.
bool exclude_exhausted_sessions = 3;
}
message TowerSession {
/*
The total number of successful backups that have been made to the
watchtower session.
*/
uint32 num_backups = 1;
/*
The total number of backups in the session that are currently pending to be
acknowledged by the watchtower.
*/
uint32 num_pending_backups = 2;
// The maximum number of backups allowed by the watchtower session.
uint32 max_backups = 3;
/*
Deprecated, use sweep_sat_per_vbyte.
The fee rate, in satoshis per vbyte, that will be used by the watchtower for
the justice transaction in the event of a channel breach.
*/
uint32 sweep_sat_per_byte = 4 [deprecated = true];
/*
The fee rate, in satoshis per vbyte, that will be used by the watchtower for
the justice transaction in the event of a channel breach.
*/
uint32 sweep_sat_per_vbyte = 5;
}
message Tower {
// The identifying public key of the watchtower.
bytes pubkey = 1;
// The list of addresses the watchtower is reachable over.
repeated string addresses = 2;
// Deprecated, use the active_session_candidate field under the
// correct identifier in the client_type map.
// Whether the watchtower is currently a candidate for new sessions.
bool active_session_candidate = 3 [deprecated = true];
// Deprecated, use the num_sessions field under the correct identifier
// in the client_type map.
// The number of sessions that have been negotiated with the watchtower.
uint32 num_sessions = 4 [deprecated = true];
// Deprecated, use the sessions field under the correct identifier in the
// client_type map.
// The list of sessions that have been negotiated with the watchtower.
repeated TowerSession sessions = 5 [deprecated = true];
// A list sessions held with the tower.
repeated TowerSessionInfo session_info = 6;
}
message TowerSessionInfo {
// Whether the watchtower is currently a candidate for new sessions.
bool active_session_candidate = 1;
// The number of sessions that have been negotiated with the watchtower.
uint32 num_sessions = 2;
// The list of sessions that have been negotiated with the watchtower.
repeated TowerSession sessions = 3;
// The session's policy type.
PolicyType policy_type = 4;
}
message ListTowersRequest {
// Whether we should include sessions with the watchtower in the response.
bool include_sessions = 1;
// Whether to exclude exhausted sessions in the response info. This option
// is only meaningful if include_sessions is true.
bool exclude_exhausted_sessions = 2;
}
message ListTowersResponse {
// The list of watchtowers available for new backups.
repeated Tower towers = 1;
}
message StatsRequest {
}
message StatsResponse {
/*
The total number of backups made to all active and exhausted watchtower
sessions.
*/
uint32 num_backups = 1;
/*
The total number of backups that are pending to be acknowledged by all
active and exhausted watchtower sessions.
*/
uint32 num_pending_backups = 2;
/*
The total number of backups that all active and exhausted watchtower
sessions have failed to acknowledge.
*/
uint32 num_failed_backups = 3;
// The total number of new sessions made to watchtowers.
uint32 num_sessions_acquired = 4;
// The total number of watchtower sessions that have been exhausted.
uint32 num_sessions_exhausted = 5;
}
enum PolicyType {
// Selects the policy from the legacy tower client.
LEGACY = 0;
// Selects the policy from the anchor tower client.
ANCHOR = 1;
}
message PolicyRequest {
/*
The client type from which to retrieve the active offering policy.
*/
PolicyType policy_type = 1;
}
message PolicyResponse {
/*
The maximum number of updates each session we negotiate with watchtowers
should allow.
*/
uint32 max_updates = 1;
/*
Deprecated, use sweep_sat_per_vbyte.
The fee rate, in satoshis per vbyte, that will be used by watchtowers for
justice transactions in response to channel breaches.
*/
uint32 sweep_sat_per_byte = 2 [deprecated = true];
/*
The fee rate, in satoshis per vbyte, that will be used by watchtowers for
justice transactions in response to channel breaches.
*/
uint32 sweep_sat_per_vbyte = 3;
}

View file

@ -710,11 +710,11 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
spendUnconfirmed: Boolean
): Future[PSBT] = {
val outputMap = outputs.map { case (addr, amt) =>
addr.toString -> amt.satoshis.toUInt64
addr.toString -> amt.satoshis.toLong
}
val template = TxTemplate(inputs, outputMap)
val rawTemplate = FundPsbtRequest.Template.Raw(template)
val fees = SatPerVbyte(UInt64(feeRate.toLong))
val fees = SatPerVbyte(feeRate.toLong)
val request = FundPsbtRequest(
template = rawTemplate,
fees = fees,
@ -732,11 +732,11 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
spendUnconfirmed: Boolean
): Future[PSBT] = {
val outputMap = outputs.map { case (addr, amt) =>
addr.toString -> amt.satoshis.toUInt64
addr.toString -> amt.satoshis.toLong
}
val template = TxTemplate(inputs, outputMap)
val rawTemplate = FundPsbtRequest.Template.Raw(template)
val fees = SatPerVbyte(UInt64(feeRate.toLong))
val fees = SatPerVbyte(feeRate.toLong)
val request = FundPsbtRequest(
template = rawTemplate,
fees = fees,
@ -754,7 +754,7 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
spendUnconfirmed: Boolean
): Future[PSBT] = {
val template = Psbt(psbt.bytes)
val fees = SatPerVbyte(UInt64(feeRate.toLong))
val fees = SatPerVbyte(feeRate.toLong)
val request = FundPsbtRequest(
template = template,
fees = fees,
@ -771,7 +771,7 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
spendUnconfirmed: Boolean
): Future[PSBT] = {
val template = Psbt(psbt.bytes)
val fees = SatPerVbyte(UInt64(feeRate.toLong))
val fees = SatPerVbyte(feeRate.toLong)
val request = FundPsbtRequest(
template = template,
fees = fees,
@ -783,7 +783,7 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
def fundPSBT(psbt: PSBT, feeRate: SatoshisPerVirtualByte): Future[PSBT] = {
val template = Psbt(psbt.bytes)
val fees = SatPerVbyte(UInt64(feeRate.toLong))
val fees = SatPerVbyte(feeRate.toLong)
val request = FundPsbtRequest(template, fees)
fundPSBT(request)
@ -835,7 +835,7 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
val signDescriptor =
SignDescriptor(
output = Some(output),
sighash = UInt32(hashType.num),
sighash = hashType.num,
inputIndex = inputIdx,
signMethod = signMethod
)
@ -855,7 +855,7 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
val signDescriptor =
SignDescriptor(
output = Some(output),
sighash = UInt32(HashType.sigHashAll.num),
sighash = HashType.sigHashAll.num,
inputIndex = inputIdx,
signMethod = signMethod
)
@ -871,7 +871,7 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
val signDescriptor =
SignDescriptor(
output = Some(output),
sighash = UInt32(HashType.sigHashAll.num),
sighash = HashType.sigHashAll.num,
inputIndex = inputIdx
)
@ -930,7 +930,7 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
val request = LeaseOutputRequest(
id = LndRpcClient.leaseId,
outpoint = Some(outPoint),
expirationSeconds = UInt64(leaseSeconds)
expirationSeconds = leaseSeconds
)
leaseOutput(request)
@ -948,7 +948,7 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
def leaseOutput(request: LeaseOutputRequest): Future[UInt64] = {
logger.trace("lnd calling leaseoutput")
wallet.leaseOutput(request).map(_.expiration)
wallet.leaseOutput(request).map(x => UInt64(x.expiration))
}
def releaseOutput(outpoint: TransactionOutPoint): Future[Unit] = {
@ -1070,8 +1070,8 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
ConfRequest(
txid = DoubleSha256Digest.empty.bytes,
script = script.asmBytes,
numConfs = UInt32(requiredConfs),
heightHint = UInt32(heightHint)
numConfs = requiredConfs,
heightHint = heightHint
)
registerConfirmationsNotification(request)
@ -1095,8 +1095,8 @@ class LndRpcClient(val instance: LndInstance, binaryOpt: Option[File] = None)(
ConfRequest(
txid = txId.bytes,
script = script.asmBytes,
numConfs = UInt32(requiredConfs),
heightHint = UInt32(heightHint)
numConfs = requiredConfs,
heightHint = heightHint
)
registerConfirmationsNotification(request)
@ -1235,7 +1235,7 @@ object LndRpcClient {
hex"8c45ee0b90e3afd0fb4d6f39afa3c5d551ee5f2c7ac2d06820ed3d16582186d2"
/** The current version we support of Lnd */
private[bitcoins] val version = "v0.17.3-beta"
private[bitcoins] val version = "v0.17.5-beta"
/** Key used for adding the macaroon to the gRPC header */
private[lnd] val macaroonKey = "macaroon"

View file

@ -38,7 +38,7 @@ trait LndFixture extends BitcoinSFixture with CachedBitcoindNewest {
}
/** A trait that is useful if you need Lnd fixtures for your test suite */
trait DualLndFixture extends BitcoinSFixture with CachedBitcoindV26 {
trait DualLndFixture extends BitcoinSFixture with CachedBitcoindNewest {
override type FixtureParam = (BitcoindRpcClient, LndRpcClient, LndRpcClient)

View file

@ -4,7 +4,6 @@ import org.apache.pekko.actor.ActorSystem
import org.bitcoins.asyncutil.AsyncUtil
import org.bitcoins.commons.util.BitcoinSLogger
import org.bitcoins.core.currency.{Bitcoins, CurrencyUnit, Satoshis}
import org.bitcoins.core.number.UInt32
import org.bitcoins.core.protocol.ln.node.NodeId
import org.bitcoins.core.protocol.transaction.TransactionOutPoint
import org.bitcoins.core.wallet.fee.SatoshisPerVirtualByte
@ -159,7 +158,7 @@ trait LndRpcTestUtil extends BitcoinSLogger {
for {
blockCount <- bitcoind.getBlockCount()
info <- client.getInfo
} yield info.blockHeight == UInt32(blockCount)
} yield info.blockHeight.toInt == blockCount
/** Shuts down an lnd daemon and the bitcoind daemon it is associated with
*/