Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo & remove unused / obsolete constants in kzg package #124

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions crypto/kzg/kzg.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ type BlobsSidecar struct {
}

const (
BlobTxType = 5
PrecompileInputLength = 192
BlobVersionedHashesOffset = 258 // position of blob_versioned_hashes offset in a serialized blob tx, see TxPeekBlobVersionedHashes
PrecompileInputLength = 192
)

var (
Expand All @@ -42,8 +40,8 @@ var precompileReturnValue [64]byte
var gCryptoCtx gokzg4844.Context
var initCryptoCtx sync.Once

// InitializeCrypytoCtx initializes the global context object returned via CryptoCtx
func InitializeCrypytoCtx() {
// InitializeCryptoCtx initializes the global context object returned via CryptoCtx
func InitializeCryptoCtx() {
initCryptoCtx.Do(func() {
// Initialize context to match the configurations that the
// specs are using.
Expand All @@ -63,7 +61,7 @@ func InitializeCrypytoCtx() {
// This function is expensive to run if the crypto context isn't initialized, so it is recommended to
// pre-initialize by calling InitializeCryptoCtx
func CrpytoCtx() gokzg4844.Context {
InitializeCrypytoCtx()
InitializeCryptoCtx()
return gCryptoCtx
}

Expand Down