mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-24 12:44:34 +02:00
Merge pull request #7689 from guggero/housekeeping
Housekeeping (fix small issues, take over stale contributor PRs)
This commit is contained in:
16
rpcserver.go
16
rpcserver.go
@@ -970,6 +970,11 @@ func addrPairsToOutputs(addrPairs map[string]int64,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !addr.IsForNet(params) {
|
||||
return nil, fmt.Errorf("address is not for %s",
|
||||
params.Name)
|
||||
}
|
||||
|
||||
pkscript, err := txscript.PayToAddrScript(addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -2579,7 +2584,14 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
|
||||
in.DeliveryAddress, r.cfg.ActiveNetParams.Params,
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid delivery address: %v", err)
|
||||
return fmt.Errorf("invalid delivery address: "+
|
||||
"%v", err)
|
||||
}
|
||||
|
||||
if !addr.IsForNet(r.cfg.ActiveNetParams.Params) {
|
||||
return fmt.Errorf("delivery address is not "+
|
||||
"for %s",
|
||||
r.cfg.ActiveNetParams.Params.Name)
|
||||
}
|
||||
|
||||
// Create a script to pay out to the address provided.
|
||||
@@ -3967,7 +3979,7 @@ func (r *rpcServer) ClosedChannels(ctx context.Context,
|
||||
// the htlc has no final resolution yet, a NotFound grpc status code is
|
||||
// returned.
|
||||
func (r *rpcServer) LookupHtlcResolution(
|
||||
ctx context.Context, in *lnrpc.LookupHtlcResolutionRequest) (
|
||||
_ context.Context, in *lnrpc.LookupHtlcResolutionRequest) (
|
||||
*lnrpc.LookupHtlcResolutionResponse, error) {
|
||||
|
||||
if !r.cfg.StoreFinalHtlcResolutions {
|
||||
|
Reference in New Issue
Block a user