Commit 23eaebf3 authored by Andreas Bigger's avatar Andreas Bigger

fix: unsubscribes and redundant methods

parent 5e43d79f
...@@ -65,7 +65,7 @@ func (c *Challenger) Client() *ethclient.Client { ...@@ -65,7 +65,7 @@ func (c *Challenger) Client() *ethclient.Client {
} }
func (c *Challenger) NewOracleSubscription() (*Subscription, error) { func (c *Challenger) NewOracleSubscription() (*Subscription, error) {
query, err := c.BuildOutputLogFilter() query, err := BuildOutputLogFilter(c.l2ooABI)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
...@@ -34,8 +34,3 @@ func BuildOutputLogFilter(l2ooABI *abi.ABI) (ethereum.FilterQuery, error) { ...@@ -34,8 +34,3 @@ func BuildOutputLogFilter(l2ooABI *abi.ABI) (ethereum.FilterQuery, error) {
return query, nil return query, nil
} }
// BuildOutputLogFilter creates a filter query for the L2OutputOracle contract.
func (c *Challenger) BuildOutputLogFilter() (ethereum.FilterQuery, error) {
return BuildOutputLogFilter(c.l2ooABI)
}
...@@ -41,6 +41,8 @@ func Oracle(logger log.Logger, cfg *config.Config) error { ...@@ -41,6 +41,8 @@ func Oracle(logger log.Logger, cfg *config.Config) error {
return err return err
} }
defer subscription.Quit()
interruptChannel := make(chan os.Signal, 1) interruptChannel := make(chan os.Signal, 1)
signal.Notify(interruptChannel, []os.Signal{ signal.Notify(interruptChannel, []os.Signal{
os.Interrupt, os.Interrupt,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment