Skip to content

Commit

Permalink
CR fixes and one comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cce committed May 30, 2023
1 parent 2f25253 commit 81c8461
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions ledger/acctupdates.go
Original file line number Diff line number Diff line change
Expand Up @@ -1508,8 +1508,7 @@ func (au *accountUpdates) lookupWithoutRewards(rnd basics.Round, addr basics.Add
}

// getCreatorForRound returns the asset/app creator for a given asset/app index at a given round
func (au *accountUpdates) getCreatorForRound(rnd basics.Round, cidx basics.CreatableIndex, ctype basics.CreatableType, synchronized bool) (
/* creator */ basics.Address /* found */, bool, error) {
func (au *accountUpdates) getCreatorForRound(rnd basics.Round, cidx basics.CreatableIndex, ctype basics.CreatableType, synchronized bool) (basics.Address, bool, error) {
unlock := false
if synchronized {
au.accountsMu.RLock()
Expand Down
1 change: 1 addition & 0 deletions ledger/catchpointtracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ func (ct *catchpointTracker) accountsUpdateBalances(accountsDeltas compactAccoun
if ct.log.GetTelemetryEnabled() {
root, rootErr := ct.balancesTrie.RootHash()
if rootErr != nil {
// log rootErr if failed to fetch for reporting in telemetry, then return whether Commit() succeeded or not
ct.log.Errorf("accountsUpdateBalances: error retrieving balances trie root: %v", rootErr)
return commitErr
}
Expand Down
8 changes: 4 additions & 4 deletions ledger/catchupaccessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,9 @@ func (c *catchpointCatchupAccessorImpl) processStagingBalances(ctx context.Conte
wg.Add(1)
go func() {
defer wg.Done()
writeBalStart := time.Now()
writeBalancesStart := time.Now()
errBalances = c.stagingWriter.writeBalances(ctx, normalizedAccountBalances)
durBalances = time.Since(writeBalStart)
durBalances = time.Since(writeBalancesStart)
}()

// on a in-memory database, wait for the writer to finish before starting the new writer
Expand All @@ -627,9 +627,9 @@ func (c *catchpointCatchupAccessorImpl) processStagingBalances(ctx context.Conte
}
}
if hasCreatables {
writeStart := time.Now()
writeCreatablesStart := time.Now()
errCreatables = c.stagingWriter.writeCreatables(ctx, normalizedAccountBalances)
durCreatables = time.Since(writeStart)
durCreatables = time.Since(writeCreatablesStart)
}
}()

Expand Down

0 comments on commit 81c8461

Please sign in to comment.