Skip to content

Commit 7469b6d

Browse files
committed
Remove time ledger tracker as not used
* bulletin tracker is also looks unused but might me useful while refactoring
1 parent e4842fc commit 7469b6d

File tree

3 files changed

+0
-82
lines changed

3 files changed

+0
-82
lines changed

ledger/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ locking.
9797
- `Totals(round)` returns the totals of accounts, using the account
9898
tracker.
9999

100-
### Time tracker
101-
102-
- `Timestamp(round)` uses the time tracker to return the time as
103-
of `round`.
104-
105100
### Recent transactions tracker
106101

107102
- `Committed(txnid)` returns whether `txid` has been recently committed,

ledger/ledger.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ type Ledger struct {
7474
txTail txTail
7575
bulletin bulletin
7676
notifier blockNotifier
77-
time timeTracker
7877
metrics metricsTracker
7978

8079
trackers trackerRegistry
@@ -188,7 +187,6 @@ func (l *Ledger) reloadLedger() error {
188187
}
189188

190189
l.trackers.register(&l.accts) // update the balances
191-
l.trackers.register(&l.time) // tracks the block timestamps
192190
l.trackers.register(&l.txTail) // update the transaction tail, tracking the recent 1000 txn
193191
l.trackers.register(&l.bulletin) // provide closed channel signaling support for completed rounds
194192
l.trackers.register(&l.notifier) // send OnNewBlocks to subscribers
@@ -577,14 +575,6 @@ func (l *Ledger) Wait(r basics.Round) chan struct{} {
577575
return l.bulletin.Wait(r)
578576
}
579577

580-
// Timestamp uses the timestamp tracker to return the timestamp
581-
// from block r.
582-
func (l *Ledger) Timestamp(r basics.Round) (int64, error) {
583-
l.trackerMu.RLock()
584-
defer l.trackerMu.RUnlock()
585-
return l.time.timestamp(r)
586-
}
587-
588578
// GenesisHash returns the genesis hash for this ledger.
589579
func (l *Ledger) GenesisHash() crypto.Digest {
590580
return l.genesisHash

ledger/time.go

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)