htlcswitch/mock: set SelfKey and mock ErrorSource
This commit is contained in:
parent
52b7603d25
commit
f5dee02ff4
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user