Skip to content

Commit

Permalink
refactor(share/ipld): Use NamespaceSize var for consistency (#1297)
Browse files Browse the repository at this point in the history
self-explanatory
  • Loading branch information
renaynay committed Oct 31, 2022
1 parent 6adfd8a commit faf8b78
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions share/ipld/nmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ const (
// that contain an NMT node (inner and leaf nodes).
sha256Namespace8Flagged = 0x7701

// MaxSquareSize is currently the maximum size supported for unerasured data in rsmt2d.ExtendedDataSquare.
MaxSquareSize = appconsts.MaxSquareSize

// NamespaceSize is a system-wide size for NMT namespaces.
NamespaceSize = appconsts.NamespaceSize

// nmtHashSize is the size of a digest created by an NMT in bytes.
nmtHashSize = 2*appconsts.NamespaceSize + sha256.Size
nmtHashSize = 2*NamespaceSize + sha256.Size

// innerNodeSize is the size of data in inner nodes.
innerNodeSize = nmtHashSize * 2

// leafNodeSize is the size of data in leaf nodes.
leafNodeSize = NamespaceSize + appconsts.ShareSize

// MaxSquareSize is currently the maximum size supported for unerasured data in rsmt2d.ExtendedDataSquare.
MaxSquareSize = appconsts.MaxSquareSize

// NamespaceSize is a system-wide size for NMT namespaces.
NamespaceSize = appconsts.NamespaceSize

// cidPrefixSize is the size of the prepended buffer of the CID encoding
// for NamespacedSha256. For more information, see:
// https://multiformats.io/multihash/#the-multihash-format
Expand Down

0 comments on commit faf8b78

Please sign in to comment.