Commit Graph

155 Commits

Author SHA1 Message Date
Andrey Samokhvalov
de01721aed htlcswitch: add hop iterator
Short: such abstraction give as ability to test the channel link in the
future.

Long: hop iterator represents the entity which is be able to give payment
route hop by hop. This interface will be used to have an abstraction
over the algorithm which we use to determine the next hope in htlc route
and also helps the unit test to create mock representation of such
algorithm which uses simple array of hops.
2017-05-31 11:06:08 -07:00
Andrey Samokhvalov
db30571efe htlcswitch: start using config in channel link
Step №3 in making htlcManager (aka channelLink) testable:
Apply the channel link config inside the channel link itself.
2017-05-31 11:06:08 -07:00
Andrey Samokhvalov
2eea76375c htlcswitch: make channel link implements interface
Step №2 in making htlcManager (aka channelLink) testable:
Implement the ChannelLink interface which is needed to use it in pair
with htlc switch. With this commit channel link impelements interface,
but isn't able to operate properly yet.
2017-05-31 11:06:08 -07:00
Andrey Samokhvalov
7f572fc155 htlcswitch: add channel link config
Step №1 in making htlcManager (aka channelLink) testable:
Start use config which will allow as mock/stub external subsystems.
2017-05-31 11:06:08 -07:00
Andrey Samokhvalov
0de4ea2712 htlcswitch: copy the initial representation of htlc manager
In this commit all initial code which will be transformed into channel
link have been added. Rather than changing the in the same commit is
better to create the standalone commit, in order to see the changes
which have been applied to relocated code.
2017-05-31 11:06:08 -07:00