diff --git a/htlcswitch/mock.go b/htlcswitch/mock.go index be9c3994..df059914 100644 --- a/htlcswitch/mock.go +++ b/htlcswitch/mock.go @@ -163,7 +163,10 @@ func initSwitchWithDB(startingHeight uint32, db *channeldb.DB) (*Switch, error) } } + priv, _ := btcec.NewPrivateKey(btcec.S256()) + pubkey := priv.PubKey() cfg := Config{ + SelfKey: pubkey, DB: db, SwitchPackager: channeldb.NewSwitchPackager(), FwdingLog: &mockForwardingLog{ @@ -390,7 +393,11 @@ func (o *mockDeobfuscator) DecryptError(reason lnwire.OpaqueReason) (*Forwarding return nil, err } + priv, _ := btcec.NewPrivateKey(btcec.S256()) + pubkey := priv.PubKey() + return &ForwardingError{ + ErrorSource: pubkey, FailureMessage: failure, }, nil }