htlcswitch: move hop iterator into htlcswitch/hop package

Prepares for onion blob decoding outside of htlcswitch.
This commit is contained in:
Joost Jager
2019-09-05 13:35:39 +02:00
parent fb565bcd5d
commit e54b24289f
16 changed files with 301 additions and 259 deletions

View File

@@ -1054,7 +1054,7 @@ func createTwoClusterChannels(aliceToBob, bobToCarol btcutil.Amount) (
type hopNetwork struct {
feeEstimator *mockFeeEstimator
globalPolicy ForwardingPolicy
obfuscator ErrorEncrypter
obfuscator hop.ErrorEncrypter
defaultDelta uint32
}
@@ -1101,7 +1101,7 @@ func (h *hopNetwork) createChannelLink(server, peer *mockServer,
ForwardPackets: server.htlcSwitch.ForwardPackets,
DecodeHopIterators: decoder.DecodeHopIterators,
ExtractErrorEncrypter: func(*btcec.PublicKey) (
ErrorEncrypter, lnwire.FailCode) {
hop.ErrorEncrypter, lnwire.FailCode) {
return h.obfuscator, lnwire.CodeNone
},
FetchLastChannelUpdate: mockGetChanUpdateMessage,