From 879d3cc86c7d24f0ba9cf9fdaee9c606f9c53001 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Thu, 17 Jun 2021 20:04:25 +0800 Subject: [PATCH] wtwire: remove reference from lnwire --- watchtower/wtwire/message.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/watchtower/wtwire/message.go b/watchtower/wtwire/message.go index 2b3d22887..5bc8c75ce 100644 --- a/watchtower/wtwire/message.go +++ b/watchtower/wtwire/message.go @@ -5,8 +5,6 @@ import ( "encoding/binary" "fmt" "io" - - "github.com/lightningnetwork/lnd/lnwire" ) // MaxMessagePayload is the maximum bytes a message can be regardless of other @@ -75,7 +73,14 @@ func (m MessageType) String() string { // Serializable is an interface which defines a lightning wire serializable // object. -type Serializable = lnwire.Serializable +type Serializable interface { + // Decode reads the bytes stream and converts it to the object. + Decode(io.Reader, uint32) error + + // Encode converts object to the bytes stream and write it into the + // write buffer. + Encode(io.Writer, uint32) error +} // Message is an interface that defines a lightning wire protocol message. The // interface is general in order to allow implementing types full control over