discovery: properly set short chan IDs for ann sigs in tests

This commit is contained in:
Olaoluwa Osuntokun 2019-04-08 17:48:59 -07:00
parent 81bfebe7be
commit 13b91e6ea1

@ -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,
)