mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-30 16:10:01 +01:00
rpcserver: use primary chain default CLTV for add invoice
This commit is contained in:
@@ -2095,6 +2095,9 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
|
|||||||
default:
|
default:
|
||||||
// TODO(roasbeef): assumes set delta between versions
|
// TODO(roasbeef): assumes set delta between versions
|
||||||
defaultDelta := cfg.Bitcoin.TimeLockDelta
|
defaultDelta := cfg.Bitcoin.TimeLockDelta
|
||||||
|
if registeredChains.PrimaryChain() == litecoinChain {
|
||||||
|
defaultDelta = cfg.Litecoin.TimeLockDelta
|
||||||
|
}
|
||||||
options = append(options, zpay32.CLTVExpiry(uint64(defaultDelta)))
|
options = append(options, zpay32.CLTVExpiry(uint64(defaultDelta)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user