Skip to content

Commit 32a47d7

Browse files
yrongvgeddes
andauthored
Fix closed connection (#1322)
* 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]>
1 parent 5fc0337 commit 32a47d7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

relayer/relays/parachain/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (relay *Relay) Start(ctx context.Context, eg *errgroup.Group) error {
8686
return fmt.Errorf("unable to connect to ethereum: beefy: %w", err)
8787
}
8888

89-
err = relay.relaychainConn.Connect(ctx)
89+
err = relay.relaychainConn.ConnectWithHeartBeat(ctx, 30*time.Second)
9090
if err != nil {
9191
return err
9292
}

relayer/relays/parachain/scanner.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import (
55
"context"
66
"errors"
77
"fmt"
8-
"github.com/ethereum/go-ethereum/accounts/abi"
98
"reflect"
109
"strings"
1110

11+
"github.com/ethereum/go-ethereum/accounts/abi"
12+
1213
"github.com/snowfork/go-substrate-rpc-client/v4/scale"
1314

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

125-
s.gatherProofInputs(tasks)
126+
err = s.gatherProofInputs(tasks)
127+
if err != nil {
128+
return nil, fmt.Errorf("gather proof input: %w", err)
129+
}
126130

127131
return tasks, nil
128132
}

0 commit comments

Comments
 (0)