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

@@ -2,6 +2,7 @@ package htlcswitch
import (
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/htlcswitch/hop"
"github.com/lightningnetwork/lnd/lnwire"
)
@@ -54,7 +55,7 @@ type htlcPacket struct {
// obfuscator contains the necessary state to allow the switch to wrap
// any forwarded errors in an additional layer of encryption.
obfuscator ErrorEncrypter
obfuscator hop.ErrorEncrypter
// localFailure is set to true if an HTLC fails for a local payment before
// the first hop. In this case, the failure reason is simply encoded, not