Commit Graph

154 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
1f5a4fcb8e
htlcswitch: change over all internal indexes to use short channel ID's 2017-06-16 23:49:46 +02:00
Olaoluwa Osuntokun
74897dc328
htlcswitch: fix linter error 2017-05-31 16:48:12 -07:00
Olaoluwa Osuntokun
048e4c0a39
htlcswitch: fix issues with forwarding stats logger display
This commit fixes some issues in the display of the stats logger which
resulted in: stats being printed even though no forwarding activity
took place, and underflow of integers resulting in weird outputs when
forwarding.

This commit also adds some additional comments and renames the main
forwarding goroutine to its former name.
2017-05-31 16:16:58 -07:00
Andrey Samokhvalov
b86409cdb3 htlcswitch: recreate hlcswitch from scratch
This commit gives the start for making the htlc manager and htlc switch
testable. The testability of htlc switch have been achieved by mocking
all external subsystems. The concrete list of updates:

1. create standalone package for htlc switch.
2. add "ChannelLink" interface, which represent the previous htlc link.
3. add "Peer" interface, which represent the remote node inside our
subsystem.
4. add htlc switch config to htlc switch susbystem, which stores the
handlers which are not elongs to any of the above interfaces.

With this commit we are able test htlc switch even without having
the concrete implementation of Peer, ChannelLink structures, they will
be added later.
2017-05-31 11:06:08 -07:00