Add listunspent RPC call

Returns a brief json summary of each utxo found by calling
ListUnspentWitness in the wallet. The two arguments are the
minimum and maximum number of conrfirmations (0=include
unconfirmed)
This commit is contained in:
AdamISZ committed 2018-12-11 15:26:38 +01:00
1 parent 71444e74ac
commit 9bb2a26948
12 files changed
+1076 -558

No files matched your search

+5 -5
View File
@@ -173,7 +173,7 @@ func (n *NetworkHarness) SetUp(lndArgs []string) error {
// each.
ctxb := context.Background()
addrReq := &lnrpc.NewAddressRequest{
Type: lnrpc.NewAddressRequest_WITNESS_PUBKEY_HASH,
Type: lnrpc.AddressType_WITNESS_PUBKEY_HASH,
}
clients := []lnrpc.LightningClient{n.Alice, n.Bob}
for _, client := range clients {
@@ -1200,7 +1200,7 @@ func (n *NetworkHarness) SendCoins(ctx context.Context, amt btcutil.Amount,
target *HarnessNode) error {
return n.sendCoins(
ctx, amt, target, lnrpc.NewAddressRequest_WITNESS_PUBKEY_HASH,
ctx, amt, target, lnrpc.AddressType_WITNESS_PUBKEY_HASH,
true,
)
}
@@ -1212,7 +1212,7 @@ func (n *NetworkHarness) SendCoinsUnconfirmed(ctx context.Context,
amt btcutil.Amount, target *HarnessNode) error {
return n.sendCoins(
ctx, amt, target, lnrpc.NewAddressRequest_WITNESS_PUBKEY_HASH,
ctx, amt, target, lnrpc.AddressType_WITNESS_PUBKEY_HASH,
false,
)
}
@@ -1223,7 +1223,7 @@ func (n *NetworkHarness) SendCoinsNP2WKH(ctx context.Context,
amt btcutil.Amount, target *HarnessNode) error {
return n.sendCoins(
ctx, amt, target, lnrpc.NewAddressRequest_NESTED_PUBKEY_HASH,
ctx, amt, target, lnrpc.AddressType_NESTED_PUBKEY_HASH,
true,
)
}
@@ -1232,7 +1232,7 @@ func (n *NetworkHarness) SendCoinsNP2WKH(ctx context.Context,
// targeted lightning node. The confirmed boolean indicates whether the
// transaction that pays to the target should confirm.
func (n *NetworkHarness) sendCoins(ctx context.Context, amt btcutil.Amount,
target *HarnessNode, addrType lnrpc.NewAddressRequest_AddressType,
target *HarnessNode, addrType lnrpc.AddressType,
confirmed bool) error {
balReq := &lnrpc.WalletBalanceRequest{}