Commit a16e1e29 authored by duanjinfei's avatar duanjinfei

add print log

parent 0f3a364c
......@@ -50,9 +50,12 @@ func GetTxReceipt(client *ethclient.Client, txArr []*types.Transaction) {
log.Error("Get tran receipt err:", err)
return
}
if receipt.Status == 0 || receipt.GasUsed == 0 {
log.Error("tx value:", tx.Value())
log.Error("Receipt Tx Hash:", receipt.TxHash)
if receipt.Status == 0 {
log.Error("Tx failed tx value:", tx.Value())
log.Error("Tx failed Receipt Tx Hash:", receipt.TxHash)
} else if receipt.GasUsed == 0 {
log.Error("GasUsed zero tx value:", tx.Value())
log.Error("GasUsed zero Receipt Tx Hash:", receipt.TxHash)
} else {
log.Infof("Receipt: status: %d,gasUsed: %d", receipt.Status, receipt.GasUsed)
}
......
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