Skip to content

Commit

Permalink
fix nil marshal
Browse files Browse the repository at this point in the history
  • Loading branch information
gupadhyaya committed Aug 19, 2024
1 parent aac2d1f commit f6a7775
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions serialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func byteSlicesToTxs(bytes [][]byte) []Tx {

// Marshal serializes a batch to a byte slice.
func (batch *Batch) Marshal() ([]byte, error) {
var b []byte
if batch == nil {
return b, nil
}
pb := batch.ToProto()
return pb.Marshal()
}
Expand Down

0 comments on commit f6a7775

Please sign in to comment.