Skip to content

Commit

Permalink
Merge pull request #446 from blinklabs-io/fix/blockfetch-msg-block-cbor
Browse files Browse the repository at this point in the history
fix: block-fetch MsgBlock CBOR encoding
  • Loading branch information
agaffney authored Dec 2, 2023
2 parents 288dc68 + 9601825 commit 4430d8f
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 4430d8f

Please sign in to comment.