peer+server: use new sphinx package and htlcswitch package type names

This commit is contained in:
Olaoluwa Osuntokun 2017-10-10 19:38:31 -07:00
parent a7d846ac40
commit 63838f5764
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
2 changed files with 5 additions and 5 deletions

@ -375,7 +375,7 @@ func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {
linkCfg := htlcswitch.ChannelLinkConfig{
Peer: p,
DecodeHopIterator: p.server.sphinx.DecodeHopIterator,
DecodeOnionObfuscator: p.server.sphinx.DecodeOnionObfuscator,
DecodeOnionObfuscator: p.server.sphinx.ExtractErrorEncrypter,
GetLastChannelUpdate: createGetLastUpdate(p.server.chanRouter,
p.PubKey(), lnChan.ShortChanID()),
SettledContracts: p.server.breachArbiter.settledContracts,
@ -1051,7 +1051,7 @@ out:
linkConfig := htlcswitch.ChannelLinkConfig{
Peer: p,
DecodeHopIterator: p.server.sphinx.DecodeHopIterator,
DecodeOnionObfuscator: p.server.sphinx.DecodeOnionObfuscator,
DecodeOnionObfuscator: p.server.sphinx.ExtractErrorEncrypter,
GetLastChannelUpdate: createGetLastUpdate(p.server.chanRouter,
p.PubKey(), newChanReq.channel.ShortChanID()),
SettledContracts: p.server.breachArbiter.settledContracts,

@ -255,10 +255,10 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
circuit *sphinx.Circuit) ([32]byte, error) {
// Using the created circuit, initialize the error
// decryptor so we can parse+decode any failures
// decrypter so we can parse+decode any failures
// incurred by this payment within the switch.
errorDecryptor := &htlcswitch.FailureDeobfuscator{
OnionDeobfuscator: sphinx.NewOnionDeobfuscator(circuit),
errorDecryptor := &htlcswitch.SphinxErrorDecrypter{
OnionErrorDecrypter: sphinx.NewOnionErrorDecrypter(circuit),
}
var firstHopPub [33]byte