Skip to content

Commit

Permalink
Query for non-finalized txes
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanTinianov committed Nov 2, 2023
1 parent 9dcf4b9 commit 1e664ab
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 202 deletions.
194 changes: 0 additions & 194 deletions common/txmgr/abandoned_tracker.go

This file was deleted.

14 changes: 6 additions & 8 deletions common/txmgr/confirmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ type Confirmer[
ks txmgrtypes.KeyStore[ADDR, CHAIN_ID, SEQ]
enabledAddresses []ADDR

abandonedTracker AbandonedTracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]
abandonedTracker Tracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]

mb *utils.Mailbox[HEAD]
ctx context.Context
Expand Down Expand Up @@ -162,21 +162,19 @@ func NewConfirmer[
isReceiptNil func(R) bool,
) *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE] {
lggr = lggr.Named("Confirmer")
chainID := client.ConfiguredChainID()

return &Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{
txStore: txStore,
lggr: lggr,
client: client,
TxAttemptBuilder: txAttemptBuilder,
abandonedTracker: NewAbandonedTracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE](
&txStore, &keystore, &client, chainID, lggr),
tracker: NewTracker[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE](

Check failure on line 170 in common/txmgr/confirmer.go

View workflow job for this annotation

GitHub Actions / Analyze go

unknown field tracker in struct literal of type Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]

Check failure on line 170 in common/txmgr/confirmer.go

View workflow job for this annotation

GitHub Actions / lint

unknown field tracker in struct literal of type Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]

Check failure on line 170 in common/txmgr/confirmer.go

View workflow job for this annotation

GitHub Actions / Core Tests (go_core_tests)

unknown field tracker in struct literal of type Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]

Check failure on line 170 in common/txmgr/confirmer.go

View workflow job for this annotation

GitHub Actions / Core Tests (go_core_race_tests)

unknown field tracker in struct literal of type Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]

Check failure on line 170 in common/txmgr/confirmer.go

View workflow job for this annotation

GitHub Actions / Flakey Test Detection

unknown field tracker in struct literal of type Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]
&txStore, lggr),
resumeCallback: nil,
chainConfig: chainConfig,
feeConfig: feeConfig,
txConfig: txConfig,
dbConfig: dbConfig,
chainID: chainID,
chainID: client.ConfiguredChainID(),
ks: keystore,
mb: utils.NewSingleMailbox[HEAD](),
isReceiptNil: isReceiptNil,
Expand Down Expand Up @@ -312,8 +310,8 @@ func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) pro
ec.lggr.Debugw("Finished EnsureConfirmedTransactionsInLongestChain", "headNum", head.BlockNumber(), "time", time.Since(mark), "id", "confirmer")
mark = time.Now()

ec.abandonedTracker.HandleAbandonedTransactions(ctx, ec.enabledAddresses)
ec.lggr.Debugw("Finished HandleAbandonedTransactions", "headNum", head.BlockNumber(), "time", time.Since(mark), "id", "confirmer")
ec.abandonedTracker.HandleAbandonedTxes(ctx, ec.enabledAddresses)
ec.lggr.Debugw("Finished HandleAbandonedTxes", "headNum", head.BlockNumber(), "time", time.Since(mark), "id", "confirmer")

if ec.resumeCallback != nil {
mark = time.Now()
Expand Down
Loading

0 comments on commit 1e664ab

Please sign in to comment.