mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
multi: rename ChannelAnnouncement to ChannelAnnouncment1
In preparation for adding the new ChannelAnnouncement2 message along with a ChannelAnnouncement interface, we rename the existing message to ChannelAnnouncement1.
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
// ValidateChannelAnn validates the channel announcement message and checks
|
||||
// that node signatures covers the announcement message, and that the bitcoin
|
||||
// signatures covers the node keys.
|
||||
func ValidateChannelAnn(a *lnwire.ChannelAnnouncement) error {
|
||||
func ValidateChannelAnn(a *lnwire.ChannelAnnouncement1) error {
|
||||
// First, we'll compute the digest (h) which is to be signed by each of
|
||||
// the keys included within the node announcement message. This hash
|
||||
// digest includes all the keys, so the (up to 4 signatures) will
|
||||
|
@@ -102,7 +102,7 @@ func (v *ValidationBarrier) InitJobDependencies(job interface{}) {
|
||||
// ChannelUpdates for the same channel, or NodeAnnouncements of nodes
|
||||
// that are involved in this channel. This goes for both the wire
|
||||
// type,s and also the types that we use within the database.
|
||||
case *lnwire.ChannelAnnouncement:
|
||||
case *lnwire.ChannelAnnouncement1:
|
||||
|
||||
// We ensure that we only create a new announcement signal iff,
|
||||
// one doesn't already exist, as there may be duplicate
|
||||
@@ -219,7 +219,7 @@ func (v *ValidationBarrier) WaitForDependants(job interface{}) error {
|
||||
case *lnwire.AnnounceSignatures1:
|
||||
// TODO(roasbeef): need to wait on chan ann?
|
||||
case *models.ChannelEdgeInfo:
|
||||
case *lnwire.ChannelAnnouncement:
|
||||
case *lnwire.ChannelAnnouncement1:
|
||||
}
|
||||
|
||||
// Release the lock once the above read is finished.
|
||||
@@ -275,7 +275,7 @@ func (v *ValidationBarrier) SignalDependants(job interface{}, allow bool) {
|
||||
}
|
||||
delete(v.chanAnnFinSignal, shortID)
|
||||
}
|
||||
case *lnwire.ChannelAnnouncement:
|
||||
case *lnwire.ChannelAnnouncement1:
|
||||
finSignals, ok := v.chanAnnFinSignal[msg.ShortChannelID]
|
||||
if ok {
|
||||
if allow {
|
||||
|
@@ -73,9 +73,9 @@ func TestValidationBarrierQuit(t *testing.T) {
|
||||
|
||||
// Create a set of unique channel announcements that we will prep for
|
||||
// validation.
|
||||
anns := make([]*lnwire.ChannelAnnouncement, 0, numTasks)
|
||||
anns := make([]*lnwire.ChannelAnnouncement1, 0, numTasks)
|
||||
for i := 0; i < numTasks; i++ {
|
||||
anns = append(anns, &lnwire.ChannelAnnouncement{
|
||||
anns = append(anns, &lnwire.ChannelAnnouncement1{
|
||||
ShortChannelID: lnwire.NewShortChanIDFromInt(uint64(i)),
|
||||
NodeID1: nodeIDFromInt(uint64(2 * i)),
|
||||
NodeID2: nodeIDFromInt(uint64(2*i + 1)),
|
||||
|
Reference in New Issue
Block a user