diff --git a/ethtxmanager/config.go b/ethtxmanager/config.go index 1f8b97e..16c5d1a 100644 --- a/ethtxmanager/config.go +++ b/ethtxmanager/config.go @@ -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 diff --git a/test/main.go b/test/main.go index 595ce6f..7bf025a 100644 --- a/test/main.go +++ b/test/main.go @@ -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 {