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:
Olaoluwa Osuntokun committed 2016-08-11 11:54:56 -07:00
1 parent 3563d0e6b9
commit c0d59a2d85
8 files changed
+22 -12

No files matched your search

@@ -3,6 +3,7 @@
// file LICENSE or http://www.opensource.org/licenses/mit-license.php // file LICENSE or http://www.opensource.org/licenses/mit-license.php
package lnwire package lnwire
import ( import (
"fmt" "fmt"
"io" "io"
@@ -5,10 +5,11 @@
package lnwire package lnwire
import ( import (
"io"
"github.com/BitfuryLightning/tools/rt"
"encoding/gob" "encoding/gob"
"fmt" "fmt"
"io"
"github.com/BitfuryLightning/tools/rt"
) )
type NeighborHelloMessage struct { 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) return fmt.Sprintf("NeighborHelloMessage{%v %v %v}", msg.SenderID, msg.ReceiverID, msg.RT)
} }
var _ Message = (*NeighborHelloMessage)(nil) var _ Message = (*NeighborHelloMessage)(nil)
@@ -5,8 +5,9 @@
package lnwire package lnwire
import ( import (
"testing"
"bytes" "bytes"
"testing"
"github.com/BitfuryLightning/tools/rt" "github.com/BitfuryLightning/tools/rt"
"github.com/BitfuryLightning/tools/rt/graph" "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") 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 // file LICENSE or http://www.opensource.org/licenses/mit-license.php
package lnwire package lnwire
import ( import (
"fmt" "fmt"
"io" "io"
@@ -5,10 +5,11 @@
package lnwire package lnwire
import ( import (
"fmt"
"github.com/BitfuryLightning/tools/rt"
"encoding/gob" "encoding/gob"
"fmt"
"io" "io"
"github.com/BitfuryLightning/tools/rt"
) )
type NeighborUpdMessage struct { type NeighborUpdMessage struct {
+8 -1
View File
@@ -8,20 +8,27 @@ import (
"github.com/BitfuryLightning/tools/rt/graph" "github.com/BitfuryLightning/tools/rt/graph"
) )
// RoutingMessageBase is the base struct for all routing messages within the
// lnwire package.
type RoutingMessageBase struct { type RoutingMessageBase struct {
// SenderID is the ID of the sender of the routing message.
SenderID graph.ID SenderID graph.ID
// ReceiverID is the ID of the receiver of the routig message.
ReceiverID graph.ID ReceiverID graph.ID
} }
// GetReceiverID returns the ID of the receiver of routing message.
func (msg RoutingMessageBase) GetReceiverID() graph.ID { func (msg RoutingMessageBase) GetReceiverID() graph.ID {
return msg.ReceiverID return msg.ReceiverID
} }
// GetSenderID returns the ID of the sender of the routing message.
func (msg RoutingMessageBase) GetSenderID() graph.ID { func (msg RoutingMessageBase) GetSenderID() graph.ID {
return msg.SenderID 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 { type RoutingMessage interface {
GetSenderID() graph.ID GetSenderID() graph.ID
GetReceiverID() graph.ID GetReceiverID() graph.ID
@@ -3,6 +3,7 @@
// file LICENSE or http://www.opensource.org/licenses/mit-license.php // file LICENSE or http://www.opensource.org/licenses/mit-license.php
package lnwire package lnwire
import ( import (
"fmt" "fmt"
"io" "io"
@@ -16,7 +17,6 @@ func (msg *RoutingTableRequestMessage) String() string {
return fmt.Sprintf("RoutingTableRequestMessage{%v %v}", msg.SenderID, msg.ReceiverID) return fmt.Sprintf("RoutingTableRequestMessage{%v %v}", msg.SenderID, msg.ReceiverID)
} }
func (msg *RoutingTableRequestMessage) Command() uint32 { func (msg *RoutingTableRequestMessage) Command() uint32 {
return CmdRoutingTableRequestMessage return CmdRoutingTableRequestMessage
} }
@@ -5,10 +5,11 @@
package lnwire package lnwire
import ( import (
"io"
"github.com/BitfuryLightning/tools/rt"
"encoding/gob" "encoding/gob"
"fmt" "fmt"
"io"
"github.com/BitfuryLightning/tools/rt"
) )
type RoutingTableTransferMessage struct { type RoutingTableTransferMessage struct {