From 13b91e6ea1d41f16116869a62bafe0f93a804815 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 8 Apr 2019 17:48:59 -0700 Subject: [PATCH] discovery: properly set short chan IDs for ann sigs in tests --- discovery/gossiper_test.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/discovery/gossiper_test.go b/discovery/gossiper_test.go index 066d76e2e..b4b1100d6 100644 --- a/discovery/gossiper_test.go +++ b/discovery/gossiper_test.go @@ -471,12 +471,10 @@ func createAnnouncements(blockHeight uint32) (*annBatch, error) { return nil, err } - batch.localProofAnn = &lnwire.AnnounceSignatures{ - NodeSignature: batch.remoteChanAnn.NodeSig1, - BitcoinSignature: batch.remoteChanAnn.BitcoinSig1, - } - batch.remoteProofAnn = &lnwire.AnnounceSignatures{ + ShortChannelID: lnwire.ShortChannelID{ + BlockHeight: blockHeight, + }, NodeSignature: batch.remoteChanAnn.NodeSig2, BitcoinSignature: batch.remoteChanAnn.BitcoinSig2, } @@ -486,6 +484,14 @@ func createAnnouncements(blockHeight uint32) (*annBatch, error) { return nil, err } + batch.localProofAnn = &lnwire.AnnounceSignatures{ + ShortChannelID: lnwire.ShortChannelID{ + BlockHeight: blockHeight, + }, + NodeSignature: batch.localChanAnn.NodeSig1, + BitcoinSignature: batch.localChanAnn.BitcoinSig1, + } + batch.chanUpdAnn1, err = createUpdateAnnouncement( blockHeight, 0, nodeKeyPriv1, timestamp, )