Commit Graph

964 Commits

Author SHA1 Message Date
Eng Zer Jun
9294b53fcc
htlcswitch: use T.TempDir to create temporary test directory
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-08-24 09:03:01 +08:00
yyforyongyu
0735522194
multi: fix make fmt 2022-08-23 22:10:24 +08:00
Olaoluwa Osuntokun
1e556aa189
multi: thread through the new max fee field for co-op close
In this commit, we parse the new max fee field, and pass it through the
switch, all the way to the peer where it's ultimately passed into the
chan closer state machine.
2022-07-26 17:23:16 -07:00
eugene
13c15e8038
server+htlcswitch: prevent privacy leaks, allow alias routing
This intent of this change is to prevent privacy leaks when routing
with aliases and also to allow routing when using an alias. The
aliases are our aliases.

Introduces are two maps:

* aliasToReal:
  This is an N->1 mapping for a channel. The keys are the set of
  aliases and the value is the confirmed, on-chain SCID.

* baseIndex:
  This is also an N->1 mapping for a channel. The keys are the set
  of aliases and the value is the "base" SCID (whatever is in the
  OpenChannel.ShortChannelID field). There is also a base->base
  mapping, so not all keys are aliases.

The above maps are populated when a link is added to the switch and
when the channel has confirmed on-chain. The maps are not removed
from if the link is removed, but this is fine since forwarding won't
occur.

* getLinkByMapping
  This function is introduced to adhere to the spec requirements that
  using the confirmed SCID of a private, scid-alias-feature-bit
  channel does not work. Lnd implements a stricter version of the spec
  and disallows this behavior if the feature-bit was negotiated, rather
  than just the channel type. The old, privacy-leak behavior is
  preserved.

The spec also requires that if we must fail back an HTLC, the
ChannelUpdate must use the SCID of whatever was in the onion, to avoid
a privacy leak. This is also done by passing in the relevant SCID to
the mailbox and link. Lnd will also cancel back on the "incoming" side
if the InterceptableSwitch was used or if the link failed to decrypt
the onion. In this case, we are cautious and replace the SCID if an
alias exists.
2022-07-07 17:10:28 -04:00
eugene
c9f5912601
channeldb: BigSize migration, store zero-conf, scid-alias bits
This introduces a BigSize migration that is used to expand the width
of the ChannelStatus and ChannelType fields. Three channel "types"
are added - ZeroConfBit, ScidAliasChanBit, and ScidAliasFeatureBit.
ScidAliasChanBit denotes that the scid-alias channel type was
negotiated for the channel. ScidAliasFeatureBit denotes that the
scid-alias feature bit was negotiated during the *lifetime* of the
channel. Several helper functions on the OpenChannel struct are
exposed to aid callers from different packages.

The RefreshShortChanID has been renamed to Refresh.

A new function BroadcastHeight is used to guard access to the
mutable FundingBroadcastHeight member. This prevents data races.
2022-07-07 17:10:27 -04:00
Olaoluwa Osuntokun
98ab9e3057
Merge pull request #6642 from Crypt-iQ/linkstopidx
htlcswitch: add linkStopIndex to cleanly shutdown ChannelLink
2022-06-30 17:01:07 -07:00
Olaoluwa Osuntokun
7b56b67f34
Merge pull request #6546 from carlaKC/bolts-950-warningmessage
lnwire/peer: add ability to read + log peer warning messages
2022-06-30 16:56:20 -07:00
eugene
407184ac51
htlcswitch: add linkStopIndex to cleanly shutdown ChannelLink
With this, extra calls to RemoveLink will wait for the link to
fully stop. This is accomplished by a map that stores a single stop
channel that callers to RemoveLink will listen on. This map is not
consulted when the Switch is shutting down and calls Stop on each
individual link. Though that could be added in the future, it is
not necessary.
2022-06-30 15:02:57 -04:00
Tommy Volk
9a10c80bcb multi: move many t.Fatalf calls to require.NoError 2022-06-17 04:26:55 +00:00
Carla Kirk-Cohen
99828b8ebb
multi: add ability to read warning messages and log on link level
Warning messages are intended to add "softer" failure modes for peers,
so to start with we simply log the warnings sent to us. While we "may"
disconnect from the peer according to the spec, we start with the least
extreme option (which is also not a change in behavior because
previously we'd just log that we received an unknown odd message).
2022-05-16 13:51:31 -04:00
eugene
87a486f1f9
htlcswitch: remove synchronous link handoff, special-case keystone err
This allows Switch-initiated payments to be failed back if they don't
make it into a commitment. Prior to this commit, a Switch-initiated
HTLC could get "lost" meaning the circuit wouldn't get deleted except
if conditions were "right" and the network result store would never
be made aware of the HTLC's fate. Switch-initiated HTLC's are now
passed to the link's mailbox to ensure they can be failed back.

This change also special-cases the ErrDuplicateKeystone error from
OpenCircuits(...) so that callers of updateCommitTx() in the link
don't send an Error to the peer if they encounter the keystone error.
With the first async change, the keystone error should now always
be recoverable.
2022-05-11 13:49:37 -04:00
Olaoluwa Osuntokun
0ec88b5346
Merge pull request #6347 from yyforyongyu/5388-rm-revc-log
lnwallet+channeldb: store minimal info in revocation log bucket
2022-05-05 15:52:59 -07:00
Oliver Gugger
bdd1c5c4e1
Merge pull request #6423 from tvolk131/fix_typos
Typo fixes and code cleanup
2022-05-05 09:42:39 +02:00
Tommy Volk
5ae2ce984e multi: typo fixes [skip ci] 2022-05-03 20:55:40 +00:00
eugene
f7b3da4bb2
htlcswitch+lntest: modify Switch to persist resolution messages
Include unit tests for the Switch, and integration tests that
exercise the persistence logic.
2022-04-29 16:40:19 -04:00
eugene
bfed7a088f
htlcswitch: introduce resolutionStore to persist cnct messages 2022-04-29 16:40:16 -04:00
yyforyongyu
22d98ca6d5
multi: use new revocation log when creating breach retribution
This commit changes the `NewBreachRetribution` to use the new revocation
log format, while maintaining the compatibilty to use an older
revocation log format. Unit tests have been added to make sure a breach
retribution can be created in both log formats.

This also means the watch tower needs to pass the relevant commit tx at
its backup height when creating the breach retribution during backing
up. This is achieved by recording the current remote commitment state
before advancing the remote commitment chain.
2022-04-20 01:18:14 +08:00
yyforyongyu
acde626ac9
lnwallet+htlcswitch: remove the redundant param in OweCommitment
This commit removes the bool param found in OweCommitment, which we
only ever use `true`.
2022-04-20 01:18:12 +08:00
Olaoluwa Osuntokun
d397e3e680
Merge pull request #6340 from Roasbeef/go-1-18
build: update to Go 1.18
2022-04-13 15:02:26 -07:00
Olaoluwa Osuntokun
440f4d982c
Merge pull request #5810 from bottlepay/payment-metadata
routing: send payment metadata
2022-04-13 15:01:56 -07:00
Joost Jager
62ae0387ff
htlcswitch+invoices: log payment metadata 2022-04-13 22:55:42 +02:00
Joost Jager
721fb4ee88
contractcourt: add onchain interception 2022-04-13 11:31:33 +02:00
Joost Jager
57e08dfa54
htlcswitch: refactor interceptForward
Preparation for adding on-chain interception.
2022-04-13 10:14:42 +02:00
Olaoluwa Osuntokun
a90dfff9a5
build: update to Go 1.18 2022-04-12 16:14:04 -07:00
Joost Jager
13dff2fb3e
htlcswitch: interceptor expiry check 2022-04-12 08:27:06 +02:00
Joost Jager
bae0b6bdf9
htlcswitch/test: isolate test packets
Decouple the tests somewhat and fix a bug along the way where the test
passed because of a left-over package from a prior test.
2022-04-12 08:27:04 +02:00
yyforyongyu
13ade7e9ce
htlcswitch+lnwallet: add trace logs for tickers 2022-03-24 10:01:41 +08:00
Andras Banki-Horvath
64ea883105
switch+test: fix race condition in unit test 2022-03-23 13:26:15 +01:00
Joost Jager
ae314ec794
htlcswitch: add an always on mode to interceptable switch
Co-authored-by: Juan Pablo Civile <elementohb@gmail.com>
2022-03-17 17:39:37 +01:00
Joost Jager
169f0c0bf4
routerrpc+htlcswitch: move intercepted htlc tracking to switch
In this commit we move the tracking of the outstanding intercepted htlcs
to InterceptableSwitch. This is a preparation for making the htlc
interceptor required.

Required interception involves tracking outstanding htlcs across
multiple grpc client sessions. The per-session routerrpc
forwardInterceptor object is therefore no longer the best place for
that.
2022-03-15 08:44:57 +01:00
Oliver Gugger
7dfe4018ce
multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Olaoluwa Osuntokun
a47da0a990
Merge pull request #6246 from Crypt-iQ/settle_pipeline_check
htlcswitch: only pipeline settle if add is locked-in
2022-03-02 17:07:14 -08:00
eugene
028dec80cb
htlcswitch: only pipeline settle if add is locked-in
The counter-party shouldn't be doing this anyways as they would be
giving away a preimage for free. Them doing this would bork their
own channel due to open circuits not getting trimmed on startup.
Removing this faulty behavior also makes it easier to reason about
the circuit logic.
2022-02-25 12:07:17 -05:00
Olaoluwa Osuntokun
4d9a05c2f4
Merge pull request #6221 from Crypt-iQ/link_handoff
multi: reliable hand-off from htlcswitch to contractcourt
2022-02-24 17:01:36 -08:00
Olaoluwa Osuntokun
10fba3d859
Merge pull request #6214 from yyforyongyu/server-start-order
server: start htlcswitch early in the pipeline
2022-02-24 15:32:46 -08:00
eugene
8607e8c28a
multi: reliable hand-off from htlcswitch to contractcourt
This is achieved by changing the 1-way handoff to a 2-way handoff
with a done channel.
2022-02-24 13:35:15 -05:00
Oliver Gugger
13f187046b
multi: fix issues reported by whitespace linter 2022-02-15 16:26:08 +01:00
yyforyongyu
1ad6bbfbc2
multi: add logs when subservers are starting
Also unified the log messages.
2022-02-11 21:17:03 +08:00
Oliver Gugger
895a2e497b
multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
Oliver Gugger
ffee7d1bcf
multi: fix newly detected linter issues 2022-02-10 11:02:02 +01:00
Joost Jager
e2b56f212f
htlcswitch: accept failure reason for intercepted htlcs 2022-02-01 17:18:59 +01:00
Dimitris Apostolou
530a2059e5
multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
Joost Jager
7cd7cef6c6
htlcswitch: fix duplicate close
The decayed log database opening and closing is managed at a higher
level in config_builder.go.
2022-01-10 08:42:32 +01:00
Oliver Powell
1fe6a3cf9b htlcswitch: fix hint in link tests [skip ci]
Fixes #6020.
2021-11-23 16:04:12 +02:00
eugene
ee2162b5d2
htlcswitch: remove 5 second timeout for data race unit tests 2021-10-26 10:32:13 -04:00
Wilmer Paulino
8cfb53f64a
lnwallet: support transactions and scripts for new commitment type
This commit modifies the channel state machine to be able to derive the
proper commitment and second-level HTLC output scripts required by the
new script-enforced leased channel commitment type.
2021-10-19 18:30:32 -07:00
carla
990dda4b18
multi: thread bandwidth check amount down to MayAddOutgoingHtlc
Pass htlc amount down to the channel so that we don't need to rely
on minHtlc (and pad it when the channel sets a 0 min htlc). Update
test to just check some sane values since we're no longer relying
on minHtlc amount at all.
2021-10-19 09:50:51 +02:00
Elle Mouton
f667683e6c
htlcswitch: respect minimum relay fee
When channels fee rates are being considered for an update, the minimum
relay fee should also be considered.
2021-10-05 18:30:41 +02:00
Oliver Gugger
692ea25295
Merge pull request #5642 from guggero/in-memory-graph
In-memory graph cache for faster pathfinding
2021-10-04 11:20:23 +02:00
Olaoluwa Osuntokun
32fa48df7d
Merge pull request #5770 from Crypt-iQ/dust_threshold_0619
lnwallet+htlcswitch: make Switch dust-aware
2021-09-30 20:20:19 -07:00
Olaoluwa Osuntokun
dd7bfa0c4a
Merge pull request #5650 from Roasbeef/go-1-17
build: upgrade all CI+build infra to Go 1.17
2021-09-30 19:12:29 -07:00
eugene
702b3a3258
multi: introduce config-level DustThreshold for defining threshold 2021-09-30 13:44:35 -04:00
eugene
3897baff0a
htlcswitch: call evaluateDustThreshold in SendHTLC, handlePacketForward
This commit makes SendHTLC (we are the source) evaluate the dust
threshold of the outgoing channel against the default threshold of
500K satoshis. If the threshold is exceeded by adding this HTLC, we
fail backwards. It also makes handlePacketForward (we are forwarding)
evaluate the dust threshold of the incoming channel and the outgoing
channel and fails backwards if either channel's dust sum exceeds the
default threshold.
2021-09-30 13:44:34 -04:00
eugene
0ce6194e1e
htlcswitch: extend ChannelLink iface with dustHandler iface
This allows the Switch to determine the dust exposure of a certain
channel and allows the link to set the feerate of the mailbox given
a fee update.
2021-09-30 13:44:34 -04:00
eugene
0b24603aef
htlcswitch: extend Mailbox iface with dust, fee methods
This commit extends the Mailbox interface with the SetDustClosure,
SetFeeRate, and DustPackets methods. This enables the mailbox to
report the dust exposure to the Switch when the Switch decides whether
to forward a dust packet. The dust is counted from the time an Add is
introduced via AddPacket until it is removed via AckPacket. This can
lead to some packets being counted twice before they are signed for,
but this is a trade-off between accuracy and simplicity.
2021-09-30 13:44:34 -04:00
Oliver Gugger
0b4e03f5fc
multi: add golang 1.17 compatible build tags
With go 1.17 a change to the build flags was implemented:
https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md

The formatter now automatically adds the forward-compatible build tag
format and the linter checks for them, so we need to include them in our
code.
2021-09-29 17:31:37 -07:00
eugene
49877545ba
htlcswitch: fix flake in TestShutdownIfChannelClean
When Alice receives a CommitSig near the end of the test, the test
assumed that she wouldn't reply with a RevokeAndAck message before
shutdownAssert was called. This led to a test flake. Instead, only
call shutdownAssert after we've received the RevokeAndAck.
2021-09-29 17:04:53 -04:00
Oliver Gugger
15d3f62d5e
multi: use cache for source channels 2021-09-29 17:00:04 +02:00
Andras Banki-Horvath
11cf4216e4
multi: move all channelstate operations to ChannelStateDB 2021-09-29 17:00:03 +02:00
Olaoluwa Osuntokun
7f3c59033b
Merge pull request #5527 from ErikEk/isset-validateconfig
config: sync-freelist being ignored
2021-09-28 20:35:57 -07:00
Olaoluwa Osuntokun
7bde1662e2
multi: move breach arbiter and utxo nursery into contractcourt package
In this commit, we take an initial step towards converting the existing
breach arbiter and utxo nursery logic into contract resolvers by moving
the files as is, into the `contractcourt` pacakge.

This commit is primarily move only, though we had to massage some
interfaces and config names along the way to make things compile and the
tests run properly.
2021-09-27 19:10:31 -07:00
ErikEk
d5463818a8 bbolt sync-freelist ignored 2021-09-27 06:49:56 +01:00
yyforyongyu
995b9a711f
trivial: typo fix 2021-09-23 13:24:15 +08:00
yyforyongyu
3942c7ca02
htlcswitch: clean circuits and keystones for closed channels
In this commit, a new method `cleanClosedChannels` is added and called
when a circuit map is created. This method will delete the payment
circuits and keystones for closed channels.
2021-09-23 13:24:15 +08:00
yyforyongyu
1274e31dfb
htlcswitch: remove unused function in switch 2021-09-23 13:24:14 +08:00
yyforyongyu
22848df07a
htlcswitch: fix docs on LookupCircuit 2021-09-23 13:24:14 +08:00
yyforyongyu
e513057eae
htlcswitch: add docs for circuit bucket hierarchy 2021-09-23 13:22:34 +08:00
yyforyongyu
3d50edf9f8
channeldb: add method to wipe all forwarding packages
This commit adds a method, Wipe, to remove all forwarding packages on
disk for a given channel.
2021-09-23 13:22:33 +08:00
Olaoluwa Osuntokun
ac5f88bae8
Merge pull request #5618 from Crypt-iQ/coop_switch_sync_08092021
multi: optimistically shutdown link during coop close
2021-09-20 18:09:07 -07:00
yyforyongyu
3204e2d74b
multi: add shutdown logs in subservers
This commit adds a simple shutdown to every subserver to assist
debugging.
2021-09-15 19:52:03 +08:00
eugene
b2e90480ed
htlcswitch: extend ChannelLink interface with ShutdownIfChannelClean
This allows a caller to ensure to optimistically shut down the link
if the channel is clean. If the channel is not clean, an error is
returned and the link continues functioning as normal. The caller
should also call RemoveLink to ensure that the link isn't seen as
usable within the switch.
2021-09-13 13:29:50 -04:00
Joost Jager
09386213be
htlcswitch: log link message with channel point
In lnd, log messages about channels are generally logged with a
reference to their channel point rather than the short channel id.
Channel point is reorg-resistant and also easier to look up in for
example a block explorer.

In the link however, all log messages are accompanied by short channel
id. This makes it difficult to grep a log for all channel activity. The
PEER message for example which are often crucial to analyse, are logged
with channel points.

This commit modifies the link logging to also use channel points.
2021-08-16 08:24:35 +02:00
eugene
23a4fad4ac
htlcswitch+peer: CreateAndAddLink in switch, add messageSwitch to peer
This commit allows the peer to be tested without relying on a raw
htlcswitch.Switch pointer. This is accomplished by using a messageSwitch
interface and adding the CreateAndAddLink method to the
htlcswitch.Switch.
2021-08-10 17:15:52 -04:00
eugene
e72468646c
htlcswitch+peer: embed ChannelUpdateHandler in ChannelLink
GetLink, GetLinksByInterface now use ChannelUpdateHandler.
2021-08-10 17:15:52 -04:00
eugene
051cd8793a
htlcswitch: introduce and embed packetHandler interface in ChannelLink
This will allow separating the now-private *htlcPacket methods from
the publicly-used ChannelLink interface methods.
2021-08-10 17:15:51 -04:00
eugene
6c6e353597
htlcswitch+peer: pass BestHeight to ChannelLinkConfig
This allows non-test usages of ChannelLinkConfig to omit the raw
htlcswitch.Switch pointer.
2021-08-10 17:15:49 -04:00
Oliver Gugger
1e27f491c7
multi: make decayed log DB remote compatible
Even though the sphinx router's persistent replay log is not crucial in
the operation of lnd as its state can be re-created by creating a new
brontide connection, we want to make lnd fully stateless and therefore
have the option of not storing any state on disk.
2021-08-04 14:55:53 +02:00
Olaoluwa Osuntokun
ccd7421488
Merge pull request #5487 from C-Otto/fix-5367
htlcswitch: log amount for failures
2021-07-09 14:35:31 -07:00
Olaoluwa Osuntokun
db3819fcef
Merge pull request #5236 from offerm/preimage-to-settleevent
feature: expose preimage in forward+settle event
2021-07-09 14:35:11 -07:00
Carsten Otto
0396220b71 htlcswitch: log amount for failures
fixes #5367
2021-07-08 20:33:00 +02:00
Olaoluwa Osuntokun
6d5ab035c5
Merge pull request #5280 from champo/interceptor_dont_leak_htlcs
htlcswitch: set sourceRef when resolving packets through interceptor
2021-07-01 17:35:26 -07:00
carla
5d717cb039
multi: surface may add outgoing hltc 2021-06-22 13:56:08 +02:00
Olaoluwa Osuntokun
6f051fa5ea
Merge pull request #5248 from joostjager/concurrent-onion
htlcswitch: concurrent onion decoding
2021-06-18 14:08:24 -07:00
offerm
2c4dbfa19f feature: expose preimage in forward+settle event
Until now, clients of SubscribeHTLCEvents didn't have access to the settled preimage. The API allows to intercept forward event and to be updated on forward events however the forward+settle event does not include the payment preimage. This pr changes allows it.
2021-06-15 22:01:24 +03:00
Joost Jager
dddf0bc887 htlcswitch: concurrent onion decoding 2021-05-24 20:12:57 +02:00
Joost Jager
94b6f8af5b htlcswitch: extract onion decode function 2021-05-24 20:12:57 +02:00
Carsten Otto
4b4d34fcce htlcswitch: change errors to warnings
for issues caused by bogus incoming HTLC data
2021-05-23 19:17:59 +01:00
Carsten Otto
2ae82df2fa htlcswitch: fix typo 2021-05-23 19:17:59 +01:00
Carsten Otto
378bc08e16 htlcswitch: add detailed "insufficient bandwidth" log message
fixes #5250
2021-05-23 19:17:59 +01:00
Carsten Otto
ac4742c2c5 htlcswitch: fix documentation 2021-05-23 19:17:59 +01:00
Carsten Otto
788c94bdcd htlcswitch: fix log message 2021-05-23 19:17:59 +01:00
Olaoluwa Osuntokun
7ab5906093
Merge pull request #5245 from bhandras/kvdb_module
kvdb: make kvdb a top level submodule to allow dependency in other projects
2021-05-13 15:59:20 -07:00
carla
34de5922ed
multi: add height-based invoice expiry
This commit adds height-based invoice expiry for hodl invoices
that have active htlcs. This allows us to cancel our intentionally
held htlcs before channels are force closed. We only add this for
hodl invoices because we expect regular invoices to automatically
be resolved.

We still keep hodl invoices in the time-based expiry queue,
because we want to expire open invoices that reach their timeout
before any htlcs are added. Since htlcs are added after the
invoice is created, we add new htlcs as they arrive in the
invoice registry. In this commit, we allow adding of duplicate
entries for an invoice to be added to the expiry queue as each
htlc arrives to keep implementation simple. Our cancellation
logic can already handle the case where an entry is already
canceled, so this is ok.
2021-05-11 08:45:29 +02:00
Juan Pablo Civile
a10c96a63b htlcswitch: set sourceRef when resolving packets through interceptor
Having it set to nil caused https://github.com/lightningnetwork/lnd/issues/5115

The problem was several layers removed from the fix. The link decides to
clean up a `fwdPkg` only if it's completed, otherwise it renotifies the
HTLCs. A package is only set to complete if it's `addAck` and
`settleFail` filters are full. For forwarded HTLCs, the `addAck` was
never being set so it would never be considered complete under this
criteria.

`addAck` is set for an HTLC when signing the next commitment TX in the
`LightningChannel`. The path for this is:
* `LightningChannel#SettleHtlc` adds the HTLC to `localUpdates`
* `LightningChannel#SignNextCommitment` builds the `ackAddRef` for all
updates with `SourceRef != nil`.
* `LightningChannel#SignNextCommitment` then passes the list of
`ackAddRef` to `OpenChannel#AppendRemoteCommitChain` to persist the new
acks in the filter

Since `SourceRef` was nil for interceptor packages, `SignNextCommitment`
ignored it and the ack was never persisted.
2021-05-07 10:31:22 -03:00
Andras Banki-Horvath
14c851c8fc
kvdb: move channeldb/kvdb to top level 2021-05-07 14:18:56 +02:00
Johan T. Halseth
a9f19b100b
router+switch: rename paymentID->attemptID
To distinguish the attempt's unique ID from the overall payment
identifier, we name it attemptID everywhere, and note that the
paymentHash argument won't be the actual payment hash for AMP payments.
2021-04-27 08:27:33 +02:00
Olaoluwa Osuntokun
9ef00d98a7
Merge pull request #5230 from carlaKC/5059-interceptorchanupdate
multi: send channel update for failed interceptor packets
2021-04-26 15:45:43 -07:00
carla
5b7b6ab9b0
multi: send channel update for failed interceptor packets 2021-04-22 19:39:37 +02:00
Roei Erez
3223df74e5 channelnotifier+discover+invoices: return error in Stop functions
In order to be consistent with other sub systems an error is now
returned from the Stop functions.
This also allows writing a generic cleanup mechanism to stop all
sub systems in case of a failure.
2021-04-13 13:26:01 +03:00
Conner Fromknecht
c2729cbbbd
htlcswitch/hop: parse and validate AMP records 2021-04-07 12:08:33 -07:00