Skip to content

Commit

Permalink
feat: add warn log on non 0 tx code
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Aug 10, 2022
1 parent ea3da76 commit b377e5f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions pkg/client/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,19 @@ func (f *faucet) Start() {
if err != nil {
log.Err(err).Int("msgCount", msgCount).Msg("Could not submit transaction")
} else if resp != nil {
log.Info().
Int("messageCount", msgCount).
Str("txHash", resp.TxHash).
Uint32("txCode", resp.Code).
Msg("Successfully submit transaction")
if resp.Code != 0 {
log.Warn().
Int("messageCount", msgCount).
Interface("tx", resp).
Msg("Transaction submitted with non 0 code")

} else {
log.Info().
Int("messageCount", msgCount).
Str("txHash", resp.TxHash).
Uint32("txCode", resp.Code).
Msg("Successfully submit transaction")
}
} else {
log.Info().Msg("No message to submit")
}
Expand Down

0 comments on commit b377e5f

Please sign in to comment.