Commit d568bd33 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update sleep time

parent cf4183ee
...@@ -142,7 +142,7 @@ func (gs *GasSender) sendGas(task *gasTask) { ...@@ -142,7 +142,7 @@ func (gs *GasSender) sendGas(task *gasTask) {
txLog := log.WithField("txHash", signedTx.Hash().Hex()) txLog := log.WithField("txHash", signedTx.Hash().Hex())
txLog.Info("tx broadcasted") txLog.Info("tx broadcasted")
for i := 0; i < 5; i++ { for i := 0; i < 5; i++ {
time.Sleep(time.Second * 1) time.Sleep(time.Millisecond * 1500)
receipt, err := gs.client.TransactionReceipt(context.Background(), signedTx.Hash()) receipt, err := gs.client.TransactionReceipt(context.Background(), signedTx.Hash())
if err != nil && err == ethereum.NotFound { if err != nil && err == ethereum.NotFound {
txLog.Info("tx receipt not found, retrying...") txLog.Info("tx receipt not found, retrying...")
...@@ -187,7 +187,7 @@ func (gs *GasSender) login(task *gasTask) { ...@@ -187,7 +187,7 @@ func (gs *GasSender) login(task *gasTask) {
txLog := log.WithField("txHash", signedTx.Hash().Hex()) txLog := log.WithField("txHash", signedTx.Hash().Hex())
txLog.Info("tx broadcasted") txLog.Info("tx broadcasted")
for i := 0; i < 5; i++ { for i := 0; i < 5; i++ {
time.Sleep(time.Second * 1) time.Sleep(time.Millisecond * 1500)
receipt, err := gs.client.TransactionReceipt(context.Background(), signedTx.Hash()) receipt, err := gs.client.TransactionReceipt(context.Background(), signedTx.Hash())
if err != nil && err == ethereum.NotFound { if err != nil && err == ethereum.NotFound {
txLog.Info("tx receipt not found, retrying...") txLog.Info("tx receipt not found, retrying...")
......
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