Skip to content

Commit

Permalink
fix: block-fetch MsgBlock CBOR encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
agaffney committed Dec 2, 2023
1 parent f701571 commit 9601825
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions protocol/blockfetch/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ func NewMsgBlock(wrappedBlock []byte) *MsgBlock {
return m
}

func (m MsgBlock) MarshalCBOR() ([]byte, error) {
tmp := []any{
m.MessageType,
cbor.Tag{
Number: cbor.CborTagCbor,
Content: m.WrappedBlock,
},
}
return cbor.Encode(&tmp)
}

type MsgBatchDone struct {
protocol.MessageBase
}
Expand Down

0 comments on commit 9601825

Please sign in to comment.