-
Notifications
You must be signed in to change notification settings - Fork 973
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into blackbox-metrics
- Loading branch information
Showing
79 changed files
with
2,539 additions
and
546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package core | ||
|
||
import ( | ||
"github.com/tendermint/tendermint/types" | ||
|
||
"github.com/celestiaorg/celestia-app/pkg/da" | ||
appshares "github.com/celestiaorg/celestia-app/pkg/shares" | ||
"github.com/celestiaorg/rsmt2d" | ||
|
||
"github.com/celestiaorg/celestia-node/libs/utils" | ||
) | ||
|
||
// extendBlock extends the given block data, returning the resulting | ||
// ExtendedDataSquare (EDS). If there are no transactions in the block, | ||
// nil is returned in place of the eds. | ||
func extendBlock(data types.Data) (*rsmt2d.ExtendedDataSquare, error) { | ||
if len(data.Txs) == 0 { | ||
return nil, nil | ||
} | ||
shares, err := appshares.Split(data, true) | ||
if err != nil { | ||
return nil, err | ||
} | ||
size := utils.SquareSize(len(shares)) | ||
return da.ExtendShares(size, appshares.ToBytes(shares)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.