Skip to content

Commit

Permalink
fix relayer bug (ethereum#92)
Browse files Browse the repository at this point in the history
* fix relayer bug
  • Loading branch information
ping-ke authored Jun 2, 2022
1 parent f3d90e0 commit 2328c0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions cmd/w3qrelayer/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const (
SubmitHeaderFunc = "submitHead"
GetNextEpochHeightFunc = "getNextEpochHeight"
gas = uint64(1000000) // uint64(math.MaxUint64 / 2)
comfirmCount = 50 // 10 * 60 / 12
comfirmCount = 40 // 10 * 60 seconds / 15 seconds
blockTime = 15 // seconds
)

var (
Expand Down Expand Up @@ -200,7 +201,8 @@ func runRelay(cmd *cobra.Command, args []string) {

err = relayer.SubmitHeaderToContract(header)
if err == nil {
time.Sleep(1 * time.Minute)
log.Info("wait for tx been confirmed", "sleep time (seconds)", (comfirmCount+5)*blockTime)
time.Sleep((comfirmCount + 5) * blockTime * time.Second)
continue
}
log.Error("SubmitHeaderToContract failed", "err", err.Error())
Expand Down
2 changes: 1 addition & 1 deletion params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ var (
LondonBlock: big.NewInt(0),
ArrowGlacierBlock: nil,
Tendermint: &TendermintConfig{
Epoch: 10000,
Epoch: 1000,
ValidatorContract: "",
ContractChainID: 0,
ValidatorChangeEpochId: 0,
Expand Down

0 comments on commit 2328c0d

Please sign in to comment.