diff --git a/peer.go b/peer.go index bb3a4ad5..b27d6b51 100644 --- a/peer.go +++ b/peer.go @@ -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, diff --git a/server.go b/server.go index 117d880e..2c906ad0 100644 --- a/server.go +++ b/server.go @@ -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