summaryrefslogtreecommitdiff
path: root/ledger/txtail.go
diff options
context:
space:
mode:
Diffstat (limited to 'ledger/txtail.go')
-rw-r--r--ledger/txtail.go26
1 files changed, 23 insertions, 3 deletions
diff --git a/ledger/txtail.go b/ledger/txtail.go
index 68cc0f5ed..a5d77e49c 100644
--- a/ledger/txtail.go
+++ b/ledger/txtail.go
@@ -17,6 +17,8 @@
package ledger
import (
+ "context"
+ "database/sql"
"fmt"
"github.com/algorand/go-algorand/config"
@@ -43,7 +45,7 @@ type txTail struct {
lowWaterMark basics.Round // the last round known to be committed to disk
}
-func (t *txTail) loadFromDisk(l ledgerForTracker) error {
+func (t *txTail) loadFromDisk(l ledgerForTracker, _ basics.Round) error {
latest := l.Latest()
hdr, err := l.BlockHdr(latest)
if err != nil {
@@ -141,7 +143,7 @@ func (t *txTail) newBlock(blk bookkeeping.Block, delta ledgercore.StateDelta) {
}
}
-func (t *txTail) committedUpTo(rnd basics.Round) basics.Round {
+func (t *txTail) committedUpTo(rnd basics.Round) (retRound, lookback basics.Round) {
maxlife := basics.Round(t.recent[rnd].proto.MaxTxnLife)
for r := range t.recent {
if r+maxlife < rnd {
@@ -152,7 +154,25 @@ func (t *txTail) committedUpTo(rnd basics.Round) basics.Round {
delete(t.lastValid, t.lowWaterMark)
}
- return (rnd + 1).SubSaturate(maxlife)
+ return (rnd + 1).SubSaturate(maxlife), basics.Round(0)
+}
+
+func (t *txTail) prepareCommit(*deferredCommitContext) error {
+ return nil
+}
+
+func (t *txTail) commitRound(context.Context, *sql.Tx, *deferredCommitContext) error {
+ return nil
+}
+
+func (t *txTail) postCommit(ctx context.Context, dcc *deferredCommitContext) {
+}
+
+func (t *txTail) handleUnorderedCommit(uint64, basics.Round, basics.Round) {
+}
+
+func (t *txTail) produceCommittingTask(committedRound basics.Round, dbRound basics.Round, dcr *deferredCommitRange) *deferredCommitRange {
+ return dcr
}
// txtailMissingRound is returned by checkDup when requested for a round number below the low watermark