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

Typo Fix: "Transcation" to "Transaction" #4248

Merged
merged 4 commits into from
Sep 17, 2022
Merged
Show file tree
Hide file tree
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: 5 additions & 5 deletions data/transactions/verify/verifiedTxnCache.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ type VerifiedTransactionCache interface {
Add(txgroup []transactions.SignedTxn, groupCtx *GroupContext)
// AddPayset works in a similar way to Add, but is intended for adding an array of transaction groups, along with their corresponding contexts.
AddPayset(txgroup [][]transactions.SignedTxn, groupCtxs []*GroupContext) error
// GetUnverifiedTranscationGroups compares the provided payset against the currently cached transactions and figure which transaction groups aren't fully cached.
GetUnverifiedTranscationGroups(payset [][]transactions.SignedTxn, CurrSpecAddrs transactions.SpecialAddresses, CurrProto protocol.ConsensusVersion) [][]transactions.SignedTxn
// GetUnverifiedTransactionGroups compares the provided payset against the currently cached transactions and figure which transaction groups aren't fully cached.
GetUnverifiedTransactionGroups(payset [][]transactions.SignedTxn, CurrSpecAddrs transactions.SpecialAddresses, CurrProto protocol.ConsensusVersion) [][]transactions.SignedTxn
// UpdatePinned replaces the pinned entries with the one provided in the pinnedTxns map. This is typically expected to be a subset of the
// already-pinned transactions. If a transaction is not currently pinned, and it's can't be found in the cache, a errMissingPinnedEntry error would be generated.
UpdatePinned(pinnedTxns map[transactions.Txid]transactions.SignedTxn) error
Expand Down Expand Up @@ -115,8 +115,8 @@ func (v *verifiedTransactionCache) AddPayset(txgroup [][]transactions.SignedTxn,
return nil
}

// GetUnverifiedTranscationGroups compares the provided payset against the currently cached transactions and figure which transaction groups aren't fully cached.
func (v *verifiedTransactionCache) GetUnverifiedTranscationGroups(txnGroups [][]transactions.SignedTxn, currSpecAddrs transactions.SpecialAddresses, currProto protocol.ConsensusVersion) (unverifiedGroups [][]transactions.SignedTxn) {
// GetUnverifiedTransactionGroups compares the provided payset against the currently cached transactions and figure which transaction groups aren't fully cached.
func (v *verifiedTransactionCache) GetUnverifiedTransactionGroups(txnGroups [][]transactions.SignedTxn, currSpecAddrs transactions.SpecialAddresses, currProto protocol.ConsensusVersion) (unverifiedGroups [][]transactions.SignedTxn) {
v.bucketsLock.Lock()
defer v.bucketsLock.Unlock()
groupCtx := &GroupContext{
Expand Down Expand Up @@ -272,7 +272,7 @@ func (v *mockedCache) AddPayset(txgroup [][]transactions.SignedTxn, groupCtxs []
return nil
}

func (v *mockedCache) GetUnverifiedTranscationGroups(txnGroups [][]transactions.SignedTxn, currSpecAddrs transactions.SpecialAddresses, currProto protocol.ConsensusVersion) (unverifiedGroups [][]transactions.SignedTxn) {
func (v *mockedCache) GetUnverifiedTransactionGroups(txnGroups [][]transactions.SignedTxn, currSpecAddrs transactions.SpecialAddresses, currProto protocol.ConsensusVersion) (unverifiedGroups [][]transactions.SignedTxn) {
if v.alwaysVerified {
return nil
}
Expand Down
8 changes: 4 additions & 4 deletions data/transactions/verify/verifiedTxnCache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestBucketCycling(t *testing.T) {
require.Equal(t, 1, len(impl.buckets[0]))
}

func TestGetUnverifiedTranscationGroups50(t *testing.T) {
func TestGetUnverifiedTransactionGroups50(t *testing.T) {
partitiontest.PartitionTest(t)

size := 300
Expand All @@ -97,11 +97,11 @@ func TestGetUnverifiedTranscationGroups50(t *testing.T) {
}
}

unverifiedGroups := impl.GetUnverifiedTranscationGroups(txnGroups, spec, protocol.ConsensusCurrentVersion)
unverifiedGroups := impl.GetUnverifiedTransactionGroups(txnGroups, spec, protocol.ConsensusCurrentVersion)
require.Equal(t, len(expectedUnverifiedGroups), len(unverifiedGroups))
}

func BenchmarkGetUnverifiedTranscationGroups50(b *testing.B) {
func BenchmarkGetUnverifiedTransactionGroups50(b *testing.B) {
if b.N < 20000 {
b.N = 20000
}
Expand All @@ -125,7 +125,7 @@ func BenchmarkGetUnverifiedTranscationGroups50(b *testing.B) {
startTime := time.Now()
measuringMultipler := 1000
for i := 0; i < measuringMultipler; i++ {
impl.GetUnverifiedTranscationGroups(queryTxnGroups, spec, protocol.ConsensusCurrentVersion)
impl.GetUnverifiedTransactionGroups(queryTxnGroups, spec, protocol.ConsensusCurrentVersion)
}
duration := time.Now().Sub(startTime)
// calculate time per 10K verified entries:
Expand Down
2 changes: 1 addition & 1 deletion ledger/internal/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ func (validator *evalTxValidator) run() {
unverifiedTxnGroups = append(unverifiedTxnGroups, signedTxnGroup)
}

unverifiedTxnGroups = validator.txcache.GetUnverifiedTranscationGroups(unverifiedTxnGroups, specialAddresses, validator.block.BlockHeader.CurrentProtocol)
unverifiedTxnGroups = validator.txcache.GetUnverifiedTransactionGroups(unverifiedTxnGroups, specialAddresses, validator.block.BlockHeader.CurrentProtocol)

err := verify.PaysetGroups(validator.ctx, unverifiedTxnGroups, validator.block.BlockHeader, validator.verificationPool, validator.txcache)
if err != nil {
Expand Down