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

update

parent cda38955
......@@ -46,6 +46,7 @@ func runGasSender(cfg *config.Config) *gassender.GasSender {
panic(err)
}
gs.Run()
// gs.AonLogin(common.HexToAddress("aaaa"), "1", "1")
// gs.AonLogin(common.HexToAddress("11111"), "1", "1")
// gs.SendAONGas(common.HexToAddress("11111").Hex(), 1)
return gs
}
......@@ -142,7 +142,7 @@ func (gs *GasSender) sendGas(task *gasTask) {
txLog := log.WithField("txHash", signedTx.Hash().Hex())
txLog.Info("tx broadcasted")
for i := 0; i < 5; i++ {
time.Sleep(time.Second * 2)
time.Sleep(time.Second * 1)
receipt, err := gs.client.TransactionReceipt(context.Background(), signedTx.Hash())
if err != nil && err == ethereum.NotFound {
txLog.Info("tx receipt not found, retrying...")
......@@ -187,7 +187,7 @@ func (gs *GasSender) login(task *gasTask) {
txLog := log.WithField("txHash", signedTx.Hash().Hex())
txLog.Info("tx broadcasted")
for i := 0; i < 5; i++ {
time.Sleep(time.Second * 2)
time.Sleep(time.Second * 1)
receipt, err := gs.client.TransactionReceipt(context.Background(), signedTx.Hash())
if err != nil && err == ethereum.NotFound {
txLog.Info("tx receipt not found, retrying...")
......
......@@ -114,7 +114,7 @@ func createUser(c *gin.Context) {
c.JSON(200, withError("keystore already exist"))
return
}
srv.AONSendGas(fmt.Sprintf("0x%s", address))
srv.AONSendGas(addr.Hex())
c.JSON(200, withSuccess(""))
}
......
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