Skip to content

Commit

Permalink
fix config (#21)
Browse files Browse the repository at this point in the history
* fix config

* fix test
  • Loading branch information
ToniRamirezM authored Feb 9, 2024
1 parent c424fc6 commit 31ee80b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ethtxmanager/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ type Config struct {
// WaitTxToBeMined time to wait after transaction was sent to the ethereum
WaitTxToBeMined types.Duration `mapstructure:"WaitTxToBeMined"`
// ConsolidationL1ConfirmationBlocks is the number of blocks to wait for a L1 tx to be consolidated
ConsolidationL1ConfirmationBlocks uint64 `mapstructure:"L1ConsolidationConfirmationBlocks"`
ConsolidationL1ConfirmationBlocks uint64 `mapstructure:"ConsolidationL1ConfirmationBlocks"`
// FinalizationL1ConfirmationBlocks is the number of blocks to wait for a L1 tx to be finalized
FinalizationL1ConfirmationBlocks uint64 `mapstructure:"L1FinalizationConfirmationBlocks"`
FinalizationL1ConfirmationBlocks uint64 `mapstructure:"FinalizationL1ConfirmationBlocks"`

// PrivateKeys defines all the key store files that are going
// to be read in order to provide the private keys to sign the L1 txs
Expand Down
13 changes: 13 additions & 0 deletions test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ func main() {
break
}
}

// Clean up
results, err := client.ResultsByStatus(ctx, []ethtxmanager.MonitoredTxStatus{ethtxmanager.MonitoredTxStatusFinalized})
if err != nil {
log.Errorf("Error getting result: %s", err)
}
for _, result := range results {
log.Infof("Removing tx %s", result.ID)
err = client.Remove(ctx, result.ID)
if err != nil {
log.Errorf("Error removing tx %s: %s", result.ID, err)
}
}
}

func sendTransaction(ctx context.Context, ethtxmanager *ethtxmanager.Client, nonce uint64) common.Hash {
Expand Down

0 comments on commit 31ee80b

Please sign in to comment.