Commit c8a82e8e authored by Andreas Bigger's avatar Andreas Bigger

fix: unsubscribes and redundant methods

parent 2214da2e
......@@ -74,7 +74,7 @@ func (c *Challenger) NewOracleSubscription() (*Subscription, error) {
// NewFactorySubscription creates a new [Subscription] listening to the DisputeGameFactory contract.
func (c *Challenger) NewFactorySubscription() (*Subscription, error) {
query, err := c.BuildDisputeGameLogFilter()
query, err := BuildDisputeGameLogFilter(c.dgfABI)
if err != nil {
return nil, err
}
......
......@@ -31,8 +31,3 @@ func BuildDisputeGameLogFilter(contract *abi.ABI) (ethereum.FilterQuery, error)
return query, nil
}
// BuildDisputeGameLogFilter creates a filter query for the DisputeGameFactory contract.
func (c *Challenger) BuildDisputeGameLogFilter() (ethereum.FilterQuery, error) {
return BuildDisputeGameLogFilter(c.dgfABI)
}
......@@ -41,6 +41,8 @@ func Factory(logger log.Logger, cfg *config.Config) error {
return err
}
defer subscription.Quit()
interruptChannel := make(chan os.Signal, 1)
signal.Notify(interruptChannel, []os.Signal{
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