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{
|
cfg := Config{
|
||||||
|
SelfKey: pubkey,
|
||||||
DB: db,
|
DB: db,
|
||||||
SwitchPackager: channeldb.NewSwitchPackager(),
|
SwitchPackager: channeldb.NewSwitchPackager(),
|
||||||
FwdingLog: &mockForwardingLog{
|
FwdingLog: &mockForwardingLog{
|
||||||
@ -390,7 +393,11 @@ func (o *mockDeobfuscator) DecryptError(reason lnwire.OpaqueReason) (*Forwarding
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv, _ := btcec.NewPrivateKey(btcec.S256())
|
||||||
|
pubkey := priv.PubKey()
|
||||||
|
|
||||||
return &ForwardingError{
|
return &ForwardingError{
|
||||||
|
ErrorSource: pubkey,
|
||||||
FailureMessage: failure,
|
FailureMessage: failure,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user