routing: Fix bugs with not sending routing messages

LIGHT-138, LIGHT-141. Due to some issues in sending/receiving parts of lnd,
messages with zero length are not sent. So added some mock content to
NeighborAck. Moved sender/receiver from routing message to wrap message
which contains lnwire routing message.
This commit is contained in:
BitfuryLightning
2016-08-23 15:41:41 -04:00
parent b5f07ede46
commit d8bceb16f9
12 changed files with 100 additions and 62 deletions

View File

@@ -19,6 +19,7 @@ import (
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
"github.com/BitfuryLightning/tools/rt/graph"
)
var (
@@ -385,9 +386,8 @@ out:
*lnwire.NeighborUpdMessage,
*lnwire.RoutingTableRequestMessage,
*lnwire.RoutingTableTransferMessage:
// TODO(mkl): determine sender and receiver of message
p.server.routingMgr.ChIn <- msg
// Convert to base routing message and set sender and receiver
p.server.routingMgr.ReceiveRoutingMessage(msg, graph.NewID(([32]byte)(p.lightningID)))
}
if isChanUpate {