lnwire+htlcswitch: minor grammatical, formatting fixes after error PR

This commit is contained in:
Olaoluwa Osuntokun
2017-07-14 20:08:29 -07:00
parent 79b8d26b1a
commit a04fa76a4c
8 changed files with 265 additions and 203 deletions

View File

@@ -244,16 +244,17 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
htlcAdd *lnwire.UpdateAddHTLC,
circuit *sphinx.Circuit) ([32]byte, error) {
// Initialize the data obfuscator in order to be able to decode the
// onion failure and wrap it so that we could process lnwire onion
// failures.
failureDeobfuscator := &htlcswitch.FailureDeobfuscator{
// Using the created circuit, initialize the error
// decryptor so we can parse+decode any failures
// incurred by this payment within the switch.
errorDecryptor := &htlcswitch.FailureDeobfuscator{
OnionDeobfuscator: sphinx.NewOnionDeobfuscator(circuit),
}
var firstHopPub [33]byte
copy(firstHopPub[:], firstHop.SerializeCompressed())
return s.htlcSwitch.SendHTLC(firstHopPub, htlcAdd, failureDeobfuscator)
return s.htlcSwitch.SendHTLC(firstHopPub, htlcAdd, errorDecryptor)
},
})
if err != nil {