Skip to content

Commit

Permalink
fix: chunk format
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler committed Dec 9, 2024
1 parent e064c64 commit bccd81e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion engines/celestia-core-v34/celestiacore.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func (engine *Engine) GetSnapshotChunk(height, format, chunk int64) ([]byte, err
return nil, fmt.Errorf("failed to load snapshot chunk: %w", err)
}

return res.Chunk, nil
return json.Marshal(res.Chunk)
}

func (engine *Engine) GetBlock(height int64) ([]byte, error) {
Expand Down
2 changes: 1 addition & 1 deletion engines/cometbft-v37/cometbft.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func (engine *Engine) GetSnapshotChunk(height, format, chunk int64) ([]byte, err
return nil, fmt.Errorf("failed to load snapshot chunk: %w", err)
}

return res.Chunk, nil
return json.Marshal(res.Chunk)
}

func (engine *Engine) GetBlock(height int64) ([]byte, error) {
Expand Down
2 changes: 1 addition & 1 deletion engines/cometbft-v38/cometbft.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ func (engine *Engine) GetSnapshotChunk(height, format, chunk int64) ([]byte, err
return nil, fmt.Errorf("failed to load snapshot chunk: %w", err)
}

return res.Chunk, nil
return json.Marshal(res.Chunk)
}

func (engine *Engine) GetBlock(height int64) ([]byte, error) {
Expand Down
2 changes: 1 addition & 1 deletion engines/tendermint-v34/tendermint.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ func (engine *Engine) GetSnapshotChunk(height, format, chunk int64) ([]byte, err
return nil, fmt.Errorf("failed to load snapshot chunk: %w", err)
}

return res.Chunk, nil
return json.Marshal(res.Chunk)
}

func (engine *Engine) GetBlock(height int64) ([]byte, error) {
Expand Down

0 comments on commit bccd81e

Please sign in to comment.