Commit Graph

17 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
12ae63101d
Htlcswitch: rename Deobfuscator and Obfuscator interfaces
This commit renames the Deobfuscator interface to ErrorDecrypter and
the Obfuscator interface to ErrorEncrypter. With this rename, the
purpose of these two interfaces are a bit clearer.

Additionally, DecryptError (which was formerly Deobfuscate) now
directly returns an ForwardingError type instead of the
lnwire.FailureMessage.
2017-10-10 22:19:19 -07:00
Olaoluwa Osuntokun
8ecb8c70bb
htlcswitch: properly populate CommitFee for channels created in tests 2017-09-25 11:07:33 -07:00
Olaoluwa Osuntokun
246164e290
htlcswitch: when generating routes in test payload for last hop in absolute timeout 2017-09-12 21:32:07 +02:00
Olaoluwa Osuntokun
8a51b1a0c6
Htlcswitch: switch all accounting and forwarding decisions to use mSAT's 2017-08-22 00:53:04 -07:00
Olaoluwa Osuntokun
cdb7436e34
htlcswitch: update tests to account for new HTLC expiry observence 2017-08-02 21:11:40 -07:00
Olaoluwa Osuntokun
b6057abe93
hltcswitch: increase timeout for bi-di payment test due to travis slowness
This commit temporary increases the timeout for the
TestChannelLinkBidirectionalOneHopPayments test in order to account for
the slowness of the travis instances that our tests are run on.
2017-08-01 12:53:17 -07:00
Olaoluwa Osuntokun
747e0f57d1
multi: fix linter errors 2017-07-30 18:22:45 -07:00
Olaoluwa Osuntokun
402112e6ee
htlcswitch: update tests utilities to be aware of new commitment design 2017-07-30 17:51:20 -07:00
Andrey Samokhvalov
2d378b3280 htlcswitch+router: add onion error obfuscation
Within the network, it's important that when an HTLC forwarding failure
occurs, the recipient is notified in a timely manner in order to ensure
that errors are graceful and not unknown. For that reason with
accordance to BOLT №4 onion failure obfuscation have been added.
2017-07-14 19:08:04 -07:00
Johan T. Halseth
f4db249cb8 htlcswitch: handle update_fee message received from peer.
This commit makes the channellink update a channel's fee
if an update_fee message is received from the peer.
2017-07-14 16:39:15 -07:00
Andrey Samokhvalov
c13e36617c htlcswitch: return time result from bidirection test 2017-06-26 20:26:27 +03:00
Andrey Samokhvalov
c233b8816e htlcswitch: increase payment timeout in bydirectional unit test
During travis tests the latency of payment might lead to test failure,
for that reason we increase the waiting timeout.
2017-06-25 14:19:56 +01:00
Olaoluwa Osuntokun
e2e21243d2
htlcswitch: make linter happy on go 1.7 2017-06-17 01:10:08 +02:00
Olaoluwa Osuntokun
bb9bc9205a
htlcswitch: run all unit tests in parallel 2017-06-17 00:41:47 +02:00
Olaoluwa Osuntokun
e477241de1
htlcswitch: update test utilities to latest switch/link changes 2017-06-17 00:03:42 +02:00
Andrey Samokhvalov
7595bee27c htlcswitch: add usage of queue in channel link
In this commit usage of the pending packet queue have been added.
This queue will consume the downstream packets if state machine return
the error that we do not have enough capacity for htlc in commitment
transaction. Upon receiving settle/fail payment descriptors - add htlc
have been removed, we release the slot, and process pending add htlc
requests.
2017-05-31 11:06:08 -07:00
Andrey Samokhvalov
882aec704d htlcswitch: add channel link tests
Step #5 in making htlcManager (aka channelLink) testable:
Combine all that have been done so far and add test framework for channel
links which allow unit test:

* message ordering
* detect redundant messages
* single hop payment
* multihop payment
* several cancel payment scenarios
2017-05-31 11:06:08 -07:00