-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spun out of celestiaorg/celestia-app#781 In celestiaorg/celestia-app#781 , there is a need to calculate the total data length written to a compact share splitter so that a varint of this data length can be written to the first share. It becomes easier to perform this calculation if the utility function `zeroPadIfNecessary` returns the `bytesOfPadding` because the export command can subtract the `bytesOfPadding` from the number of bytes used by all shares in the compact share splitter. Without this change, it may be possible to calculate the # of bytes written by summing the # of bytes written to shares and the number of bytes in the pending share _prior_ to adding padding to the pending share but this option includes more edge cases.
- Loading branch information
Showing
4 changed files
with
20 additions
and
15 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
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