Skip to content

Commit

Permalink
Fix closed connection (#1322)
Browse files Browse the repository at this point in the history
* Fix closed connection

* Throw error

* Update relayer/relays/parachain/scanner.go

Co-authored-by: Vincent Geddes <[email protected]>

---------

Co-authored-by: Vincent Geddes <[email protected]>
  • Loading branch information
yrong and vgeddes authored Oct 25, 2024
1 parent 5fc0337 commit 32a47d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion relayer/relays/parachain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (relay *Relay) Start(ctx context.Context, eg *errgroup.Group) error {
return fmt.Errorf("unable to connect to ethereum: beefy: %w", err)
}

err = relay.relaychainConn.Connect(ctx)
err = relay.relaychainConn.ConnectWithHeartBeat(ctx, 30*time.Second)
if err != nil {
return err
}
Expand Down
8 changes: 6 additions & 2 deletions relayer/relays/parachain/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"context"
"errors"
"fmt"
"github.com/ethereum/go-ethereum/accounts/abi"
"reflect"
"strings"

"github.com/ethereum/go-ethereum/accounts/abi"

"github.com/snowfork/go-substrate-rpc-client/v4/scale"

"github.com/ethereum/go-ethereum/accounts/abi/bind"
Expand Down Expand Up @@ -122,7 +123,10 @@ func (s *Scanner) findTasks(
return nil, err
}

s.gatherProofInputs(tasks)
err = s.gatherProofInputs(tasks)
if err != nil {
return nil, fmt.Errorf("gather proof input: %w", err)
}

return tasks, nil
}
Expand Down

0 comments on commit 32a47d7

Please sign in to comment.