channeldb/mig/lnwire21: fix FailInvalidBlinding Encode sig

fix the signature of the Encode method so that it does in fact implement
the Serializable interface defined in the lnwire21 package. This differs
slightly from the interface defined in the main lnwire package.
This commit is contained in:
Elle Mouton committed 2024-10-04 10:31:46 +02:00
1 parent f1207ef740
commit 8f6d336ab2
1 file changed
+5 -1
+5 -1
View File
@@ -583,6 +583,10 @@ type FailInvalidBlinding struct {
OnionSHA256 [sha256.Size]byte
}
// A compile-time check to ensure that FailInvalidBlinding implements the
// Serializable interface.
var _ Serializable = (*FailInvalidBlinding)(nil)
// Code returns the failure unique code.
//
// NOTE: Part of the FailureMessage interface.
@@ -607,7 +611,7 @@ func (f *FailInvalidBlinding) Decode(r io.Reader, _ uint32) error {
// Encode writes the failure in bytes stream.
//
// NOTE: Part of the Serializable interface.
func (f *FailInvalidBlinding) Encode(w *bytes.Buffer, _ uint32) error {
func (f *FailInvalidBlinding) Encode(w io.Writer, _ uint32) error {
return WriteElement(w, f.OnionSHA256[:])
}