mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-07 03:13:18 +01:00
lnwire: rename routing files to match current naming conventions
This commit drops the “_message” at the end of each of the newly added routing files.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// file LICENSE or http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
package lnwire
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -5,10 +5,11 @@
|
||||
package lnwire
|
||||
|
||||
import (
|
||||
"io"
|
||||
"github.com/BitfuryLightning/tools/rt"
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/BitfuryLightning/tools/rt"
|
||||
)
|
||||
|
||||
type NeighborHelloMessage struct {
|
||||
@@ -48,5 +49,4 @@ func (msg *NeighborHelloMessage) String() string{
|
||||
return fmt.Sprintf("NeighborHelloMessage{%v %v %v}", msg.SenderID, msg.ReceiverID, msg.RT)
|
||||
}
|
||||
|
||||
|
||||
var _ Message = (*NeighborHelloMessage)(nil)
|
||||
@@ -5,8 +5,9 @@
|
||||
package lnwire
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/BitfuryLightning/tools/rt"
|
||||
"github.com/BitfuryLightning/tools/rt/graph"
|
||||
)
|
||||
@@ -37,5 +38,3 @@ func TestNeighborHelloMessageEncodeDecode(t *testing.T){
|
||||
t.Errorf("msg2.RT.HasChannel(Id2, Id1) = false, want true")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// file LICENSE or http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
package lnwire
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -5,10 +5,11 @@
|
||||
package lnwire
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/BitfuryLightning/tools/rt"
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/BitfuryLightning/tools/rt"
|
||||
)
|
||||
|
||||
type NeighborUpdMessage struct {
|
||||
@@ -8,20 +8,27 @@ import (
|
||||
"github.com/BitfuryLightning/tools/rt/graph"
|
||||
)
|
||||
|
||||
// RoutingMessageBase is the base struct for all routing messages within the
|
||||
// lnwire package.
|
||||
type RoutingMessageBase struct {
|
||||
// SenderID is the ID of the sender of the routing message.
|
||||
SenderID graph.ID
|
||||
|
||||
// ReceiverID is the ID of the receiver of the routig message.
|
||||
ReceiverID graph.ID
|
||||
}
|
||||
|
||||
// GetReceiverID returns the ID of the receiver of routing message.
|
||||
func (msg RoutingMessageBase) GetReceiverID() graph.ID {
|
||||
return msg.ReceiverID
|
||||
}
|
||||
|
||||
// GetSenderID returns the ID of the sender of the routing message.
|
||||
func (msg RoutingMessageBase) GetSenderID() graph.ID {
|
||||
return msg.SenderID
|
||||
}
|
||||
|
||||
// Interface for all routing messages. All messages have sender and receiver
|
||||
// RoutingMessageBase is a shared interface for all routing messages.
|
||||
type RoutingMessage interface {
|
||||
GetSenderID() graph.ID
|
||||
GetReceiverID() graph.ID
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// file LICENSE or http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
package lnwire
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -16,7 +17,6 @@ func (msg *RoutingTableRequestMessage) String() string {
|
||||
return fmt.Sprintf("RoutingTableRequestMessage{%v %v}", msg.SenderID, msg.ReceiverID)
|
||||
}
|
||||
|
||||
|
||||
func (msg *RoutingTableRequestMessage) Command() uint32 {
|
||||
return CmdRoutingTableRequestMessage
|
||||
}
|
||||
@@ -5,10 +5,11 @@
|
||||
package lnwire
|
||||
|
||||
import (
|
||||
"io"
|
||||
"github.com/BitfuryLightning/tools/rt"
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/BitfuryLightning/tools/rt"
|
||||
)
|
||||
|
||||
type RoutingTableTransferMessage struct {
|
||||
Reference in New Issue
Block a user