server+mod: use ECDH interface for sphinx router

This commit is contained in:
Oliver Gugger committed 2020-05-20 09:05:36 +02:00
1 parent be890ef9be
commit ee74e4ba86
4 files changed
+10 -5

No files matched your search

+3 -1
View File
@@ -13,6 +13,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/htlcswitch/hop"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lnwire"
)
@@ -84,7 +85,8 @@ func initTestExtracter() {
// db and no garbage collection.
func newOnionProcessor(t *testing.T) *hop.OnionProcessor {
sphinxRouter := sphinx.NewRouter(
sphinxPrivKey, &bitcoinCfg.SimNetParams, sphinx.NewMemoryReplayLog(),
&keychain.PrivKeyECDH{PrivKey: sphinxPrivKey},
&bitcoinCfg.SimNetParams, sphinx.NewMemoryReplayLog(),
)
if err := sphinxRouter.Start(); err != nil {