lnwire: revamp previous encode/decode tests to passing state

This commit is contained in:
Olaoluwa Osuntokun
2016-05-30 16:49:48 -07:00
parent 83b11c5efe
commit 3b6e456371
15 changed files with 269 additions and 266 deletions

View File

@@ -33,6 +33,15 @@ type CommitSignature struct {
CommitSig *btcec.Signature
}
// NewCommitSignature creates a new empty CommitSignature message.
func NewCommitSignature() *CommitSignature {
return &CommitSignature{}
}
// A compile time check to ensure CommitSignature implements the lnwire.Message
// interface.
var _ Message = (*CommitSignature)(nil)
// Decode deserializes a serialized CommitSignature message stored in the
// passed io.Reader observing the specified protocol version.
//
@@ -53,15 +62,6 @@ func (c *CommitSignature) Decode(r io.Reader, pver uint32) error {
return nil
}
// NewCommitSignature creates a new empty CommitSignature message.
func NewCommitSignature() *CommitSignature {
return &CommitSignature{}
}
// A compile time check to ensure CommitSignature implements the lnwire.Message
// interface.
var _ Message = (*CommitSignature)(nil)
// Encode serializes the target CommitSignature into the passed io.Writer
// observing the protocol version specified.
//