Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed Jun 26, 2024
1 parent c4207d0 commit 8660f06
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions go/host/storage/hostdb/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

const (
selectBlocks = "SELECT b.id, b.hash, b.header, r.hash FROM block_host b join rollup_host r on r.compression_block=b.id ORDER BY id DESC "
selectBlocks = "SELECT b.id, b.hash, b.header, r.hash FROM block_host b join rollup_host r on r.compression_block=b.id ORDER BY b.id DESC "
)

// AddBlock stores a block header with the given rollupHash it contains in the host DB
Expand Down Expand Up @@ -54,9 +54,7 @@ func GetBlockListing(db HostDB, pagination *common.QueryPagination) (*common.Blo
return nil, fmt.Errorf("could not decode block header. Cause: %w", err)
}
r := new(common.L2RollupHash)
if err := rlp.DecodeBytes(rollupHash, r); err != nil {
return nil, fmt.Errorf("could not decode rollup hash. Cause: %w", err)
}
r.SetBytes(rollupHash)
block := common.PublicBlock{
BlockHeader: *blockHeader,
RollupHash: *r,
Expand Down

0 comments on commit 8660f06

Please sign in to comment.