Skip to content

Commit

Permalink
ledger: create catchpoint tracker (#3085)
Browse files Browse the repository at this point in the history
## Summary

Extract catchpoint logic out of the accounts update tracker.

## Test Plan

Refactor existing unit tests.
  • Loading branch information
tsachiherman authored Nov 4, 2021
1 parent 9b39c66 commit f72764b
Show file tree
Hide file tree
Showing 18 changed files with 1,752 additions and 1,478 deletions.
3 changes: 3 additions & 0 deletions data/pools/transactionPool.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ var ErrStaleBlockAssemblyRequest = fmt.Errorf("AssembleBlock: requested block as

// Reset resets the content of the transaction pool
func (pool *TransactionPool) Reset() {
pool.mu.Lock()
defer pool.mu.Unlock()
defer pool.cond.Broadcast()
pool.pendingTxids = make(map[transactions.Txid]transactions.SignedTxn)
pool.pendingTxGroups = nil
pool.rememberedTxids = make(map[transactions.Txid]transactions.SignedTxn)
Expand Down
977 changes: 24 additions & 953 deletions ledger/acctupdates.go

Large diffs are not rendered by default.

Loading

0 comments on commit f72764b

Please sign in to comment.