Commit Graph
1889 Commits
Author SHA1 Message Date
Oliver Gugger efbaf90caf lnwallet: add Tree() method, fix formatting 2024-08-23 10:58:13 +02:00
Oliver Gugger f0648e24a5 lnwallet: export GenTaprootHtlcScript 2024-08-23 10:58:13 +02:00
Oliver Gugger cf2174fc2d lnwallet: export AnchorSize 2024-08-23 10:58:13 +02:00
Olaoluwa Osuntokun 38441d24c9 lnwallet/chanfunding: rename assembler.go to interface.go
In this commit, we rename the files as assembler.go houses the primary
interfaces/abstractions of the package. In the rest of the codebase,
this file is near uniformly called interface.go, so we rename the file
to make the repo more digestible at a scan.
2024-08-22 12:21:47 +02:00
Olaoluwa Osuntokun cc9e2b783e Merge pull request #8961 from yyforyongyu/fix-leaseoutput
Improve the performace of `LeaseOutput`
2024-08-21 16:31:26 -07:00
Oliver Gugger e99e6662cf multi: update linter, fix new issues 2024-08-20 19:14:44 +02:00
yyforyongyu 3e36adf476 mulit: remove ListLeasedOutputs in LeaseOutput
This commit removes the call toe `ListLeasedOutputs` in `LeaseOutput` -
the returned info from `ListLeasedOutputs` can easily be accessed via
`FetchInputInfo` and this info is only used at one callsite.
`ListLeasedOutputs` then becomes unnecessary here, plus it's very slow
and needs to be refactored in `btcwallet` instead.
2024-08-09 22:01:57 +08:00
yyforyongyu b17db4a32a lntest+lnwallet: remove the method FetchInputInfo
This method is no longer used. In addition, the `Derivation` field on
the `Utxo` is also removed to avoid nil dereference.
2024-08-09 22:01:56 +08:00
yyforyongyu aba8507b2a lnrpc+lnwallet: replace FetchInputInfo with new methods
This commit replaces the usage of `FetchInputInfo` with
`FetchOutpointInfo` and `FetchDerivationInfo` to remove unncessary
fetching of the derivation path.
2024-08-09 21:51:18 +08:00
yyforyongyu 9801ee036b lnwallet+lntest: add FetchOutpointInfo and FetchDerivationInfo 2024-08-09 21:51:17 +08:00
Ononiwu Maureen 99339f706f multi: expand SendOutputs and CreateSimpleTx to take utxos
This commit updates the interface methods from
`lnwallet.WalletController` to take optional input set which can be used
to create the tx.
2024-08-07 20:42:27 +08:00
Oliver Gugger 75ec6da177 Merge pull request #8979 from ProofOfKeags/refactor/useless-args
[NANO]: Remove useless appendages from lnwallet/channel.go
2024-08-07 01:37:56 -06:00
Keagan McClelland c3c4e79593 lnwallet: update updateLog.modifiedHtlcs to use fn.Set 2024-08-06 10:05:20 -07:00
Keagan McClelland 935e7f1bee lnwallet: remove unused parameters in LightningChannel methods 2024-08-05 18:14:11 -07:00
Keagan McClelland 14e371948b lnwallet: remove unnecessary duplicate definition 2024-08-05 18:14:11 -07:00
Olaoluwa Osuntokun c262b1b5a5 Merge pull request #8968 from ProofOfKeags/opening-party
[MICRO]: channeldb+lnwallet: add OpeningParty API
2024-08-05 16:42:22 -07:00
Keagan McClelland a2b19afe59 channeldb+lnwallet: define Initiator for OpenChannel and LightningChannel
This commit introduces a new API to return information on which party opened
the channel using the new ChannelParty type. It does not change the underlying
structure of how we store this information.
2024-08-05 12:58:46 -07:00
Oliver Gugger 11c7e20d0a Merge pull request #8953 from ProofOfKeags/refactor/lnwallet-channel-channel-constraints-partition
[MICRO]: multi: break ChannelConstraints into two sub-structures
2024-08-05 02:08:52 -06:00
Oliver Gugger 6e63dcd6f9 Merge pull request #8952 from ProofOfKeags/refactor/lnwallet-channel-typed-list
[MICRO]: lnwallet: refactor channel to use new typed List
2024-08-05 02:07:50 -06:00
Olaoluwa Osuntokun 4a3c4e4ba7 Merge pull request #8497 from ziggie1984/shutdown-bugfix
routing: shutdown chanrouter correctly.
2024-08-01 16:48:50 -07:00
Keagan McClelland e3a9d0acbe multi: break ChannelConstraints into two sub-structures
This commit breaks the ChannelConstraints structure into two
sub-structures that reflect the fundamental differences in how
these parameters are used. On its face it may not seem necessary,
however the distinction introduced here is relevant for how we
will be implementing the Dynamic Commitments proposal.
2024-08-01 12:00:32 -07:00
Keagan McClelland 0996e4f163 multi: refactor lnwallet/channel.go to use ChannelParty in select places
We also include changes to contractcourt, htlcswitch and peer to stitch the
boundaries together.
2024-07-31 14:50:26 -07:00
Keagan McClelland 33934449ac multi: refactor select methods within channeldb to use ChannelParty
Also in this commit is a small adjustment to the call-sites to get
the boundaries stitched back together.
2024-07-31 14:50:26 -07:00
Keagan McClelland 3a15085014 input+lnwallet: refactor select methods in input to use ChannelParty 2024-07-31 14:50:26 -07:00
Keagan McClelland 04c37344ae lnwallet: refactor channel to use new typed List 2024-07-31 13:03:34 -07:00
Oliver Gugger 72a36da9c6 Merge pull request #8950 from ProofOfKeags/refactor/lnwallet-channel-move-only
[NANO]: Move definitions into their own file
2024-07-31 06:53:19 -06:00
ziggie 02c1264c53 multi: prevent nil panics in stop methods.
With this PR we might call the stop method even when the start
method of a subsystem did not successfully finish therefore we
need to make sure we guard the stop methods for potential panics
if some variables are not initialized in the contructors of the
subsystems.
2024-07-31 14:43:34 +02:00
Keagan McClelland 82ff360ad2 lnwallet: fix linter errors resulting from commitmentChain move. 2024-07-30 10:22:23 -07:00
Keagan McClelland 4cf7555922 lnwallet: move commitChain to its own file. 2024-07-30 10:18:28 -07:00
Keagan McClelland 3e7866d85c lnwallet: fix linter errors introduced by updateLog move 2024-07-30 10:17:47 -07:00
Keagan McClelland 51060aed45 lnwallet: move updateLog to its own file. 2024-07-29 15:26:35 -07:00
Keagan McClelland 39db0221f0 lnwallet: move PaymentDescriptor definition to its own file 2024-07-29 15:26:35 -07:00
Eugene Siegel d6001d033b htlcswitch+lnwallet: calculate fee exposure as commit fees + dust
This commit expands the definition of the dust limit to take into
account commitment fees as well as dust HTLCs. The dust limit is now
known as a fee exposure threshold. Dust HTLCs are fees anyways so it
makes sense to account for commitment fees as well. The link has
been modified slightly to calculate dust. In the future, the switch
dust calculations can be removed.
2024-07-29 14:13:21 -04:00
yyforyongyu d992cf94d6 multi: add SpewLogClosure to avoid code repetition 2024-07-25 22:18:49 +08:00
yyforyongyu b6049ff94b multi: add NewLogClosure in lnutils to avoid repetition
And replaces all usage of `logClosure` with `lnutils.LogClosure`.
2024-07-25 21:25:23 +08:00
yyforyongyu 7e60d41898 chainfee: make sure web API has been started before estimating
Previously we may get a floor feerate when calling `EstimateFeePerKW`
due to the fee estimator not finishing its startup process, which gives
us an empty fee map.

This is now fixed to return an error if the estimator is not started.
2024-07-24 20:05:00 +08:00
yyforyongyu ce43e4bab7 chainfee: allow specifying min relay feerate from API source
This commit adds a new expected field, `min_relay_feerate`, in the
response body returned from the API source, allowing the API to specify
a min relay feerate to be used instead of the FeePerKwFloor.

This change is backwards compatible as for an old API source which
doesn't specify the `min_relay_feerate`, it will be interpreted as zero.
2024-07-24 20:05:00 +08:00
yyforyongyu 8f4bcd0b3a lnwallet: fix ErrDoubleSpend 2024-07-06 13:59:28 +08:00
yyforyongyu ddf46f435c multi: update RPC error import path
These errors are now defined in `btcwallet/chain` instead of
`btcd/rpcclient`.
2024-07-06 13:59:28 +08:00
yyforyongyu e0a506ab26 multi: use chain.MapRPCErr instead of rpcclient.MapRPCErr 2024-07-06 13:59:25 +08:00
zoupingshi 30047feb35 chore: fix some comments
Signed-off-by: zoupingshi <hellocatty@tom.com>
2024-05-31 15:16:33 +08:00
yyforyongyu 17a089c899 input+lnwallet: apply the new type lntypes.VByte 2024-05-25 13:37:16 +08:00
yyforyongyu 8da68bb7db multi: apply the new type lntypes.WeightUnit 2024-05-25 13:37:13 +08:00
yyforyongyu 634967c5c8 chainfee: add FeeForVByte on SatPerKWeight 2024-05-24 22:49:20 +08:00
Tom Kirkpatrick 3837c3f12e lnwallet: add configurable cache for web fee estimator
Add fee.min-update-timeout and fee.max-update-timeout config options to
allow configuration of the web fee estimator cache.
2024-05-04 14:41:41 +08:00
erik ab83343c87 multi: repleace ioutil.ReadFile 2024-04-25 11:22:43 +02:00
ziggie 351e9a68dd multi: Add tests to psbt and normal open channel flow.
Itests were added to the normal channel funding flow and the psbt
funding flow using unstable (unconfirmed sweeper inputs).
2024-04-24 13:58:20 +01:00
ziggie ab7634b276 multi: Add utxo restriction for batchchannel openings.
Add utxo restrictions for psbt internal wallet funded lightning
channels. This also includes batchopening channels backed by the
internal wallet.
2024-04-24 13:58:20 +01:00
ziggie 62a52b4d7c multi: Utxo restriction single funding case.
Restrict the utxo selection when opening a single internal wallet
funded backed channel.
2024-04-24 13:58:19 +01:00
yyforyongyu 0fc5301d12 lnwallet+sweep: cap conf target used in fee estimator 2024-04-19 21:33:31 +08:00