From bccd81e4c62104965870450f13623b500bd84ed7 Mon Sep 17 00:00:00 2001 From: Troy Kessler Date: Mon, 9 Dec 2024 14:31:38 +0100 Subject: [PATCH] fix: chunk format --- engines/celestia-core-v34/celestiacore.go | 2 +- engines/cometbft-v37/cometbft.go | 2 +- engines/cometbft-v38/cometbft.go | 2 +- engines/tendermint-v34/tendermint.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/celestia-core-v34/celestiacore.go b/engines/celestia-core-v34/celestiacore.go index c50c572..fe3044a 100644 --- a/engines/celestia-core-v34/celestiacore.go +++ b/engines/celestia-core-v34/celestiacore.go @@ -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) { diff --git a/engines/cometbft-v37/cometbft.go b/engines/cometbft-v37/cometbft.go index 5738a94..024c3a9 100644 --- a/engines/cometbft-v37/cometbft.go +++ b/engines/cometbft-v37/cometbft.go @@ -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) { diff --git a/engines/cometbft-v38/cometbft.go b/engines/cometbft-v38/cometbft.go index e58f9e0..a205f8e 100644 --- a/engines/cometbft-v38/cometbft.go +++ b/engines/cometbft-v38/cometbft.go @@ -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) { diff --git a/engines/tendermint-v34/tendermint.go b/engines/tendermint-v34/tendermint.go index 1ef22c6..517c284 100644 --- a/engines/tendermint-v34/tendermint.go +++ b/engines/tendermint-v34/tendermint.go @@ -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) {