From 4b841b95be1360b15b80e5a53a03c03184144630 Mon Sep 17 00:00:00 2001 From: evan-forbes Date: Fri, 20 Nov 2020 07:28:59 -0600 Subject: [PATCH] types: fixes typo causing the roots not be hashed I'm not 100% certain this needs to be changed, so please disregard if not. --- CHANGELOG_PENDING.md | 2 ++ types/block.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 8f9296c07b..dc2c54eee3 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -25,3 +25,5 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi - [statesync] \#5516 Check that all heights necessary to rebuild state for a snapshot exist before adding the snapshot to the pool. (@erikgrinaker) ### BUG FIXES + +- [types] /#97 Fixes a typo that causes the row roots of the datasquare to be included in the DataAvailabilty header twice. (@evan-forbes) \ No newline at end of file diff --git a/types/block.go b/types/block.go index f0ce1e41d0..f15ba732d5 100644 --- a/types/block.go +++ b/types/block.go @@ -89,7 +89,7 @@ func (dah *DataAvailabilityHeader) Hash() []byte { for i, rowRoot := range dah.RowsRoots { slices[i] = rowRoot.Bytes() } - for i, colRoot := range dah.RowsRoots { + for i, colRoot := range dah.ColumnRoots { slices[i+colsCount] = colRoot.Bytes() } // The single data root is computed using a simple binary merkle tree.