Fix logging

pull/3516/head
Sebastian Johnsson 4 years ago
parent 1d71d2b7f0
commit d015f8e55c
  1. 5
      rpc/transaction.go

@ -765,15 +765,14 @@ func EstimateGas(ctx context.Context, hmy *hmy.Harmony, args CallArgs, gasCap *b
if transfer == nil { if transfer == nil {
transfer = new(hexutil.Big) transfer = new(hexutil.Big)
} }
//utils.Logger().Warn().("Gas estimation capped by limited funds", "original", hi, "balance", balance, utils.Logger().Warn().Uint64("original", hi).Uint64("balance", balance.Uint64()).Uint64("sent", transfer.ToInt().Uint64()).Uint64("gasprice", args.GasPrice.ToInt().Uint64()).Uint64("fundable", allowance.Uint64()).Msg("Gas estimation capped by limited funds")
// "sent", transfer.ToInt(), "gasprice", args.GasPrice.ToInt(), "fundable", allowance)
hi = allowance.Uint64() hi = allowance.Uint64()
} }
} }
// Recap the highest gas allowance with specified gascap. // Recap the highest gas allowance with specified gascap.
if gasCap != nil && hi > gasCap.Uint64() { if gasCap != nil && hi > gasCap.Uint64() {
//log.Warn("Caller gas above allowance, capping", "requested", hi, "cap", gasCap) utils.Logger().Warn().Uint64("requested", hi).Uint64("cap", gasCap.Uint64()).Msg("Caller gas above allowance, capping")
hi = gasCap.Uint64() hi = gasCap.Uint64()
} }
cap = hi cap = hi

Loading…
Cancel
Save