Commit 0f29c24b authored by vipwzw's avatar vipwzw Committed by 33cn

fix linter

parent 8699771d
......@@ -338,7 +338,7 @@ func (policy *ticketPolicy) getTickets(addr string, status int32) ([]*ty.Ticket,
api := policy.getAPI()
msg, err := api.Query(ty.TicketX, "TicketList", reqaddr)
if err != nil {
bizlog.Error("getTickets", "Query error", err)
bizlog.Error("getTickets", "addr", addr, "status", status, "Query error", err)
return nil, err
}
reply := msg.(*ty.ReplyTicketList)
......
......@@ -137,10 +137,9 @@ func (chain *BlockChain) queryTx(msg *queue.Message) {
txhash := (msg.Data).(*types.ReqHash)
TransactionDetail, err := chain.ProcQueryTxMsg(txhash.Hash)
if err != nil {
chainlog.Error("ProcQueryTxMsg", "err", err.Error())
chainlog.Debug("ProcQueryTxMsg", "err", err.Error())
msg.Reply(chain.client.NewMessage("rpc", types.EventTransactionDetail, err))
} else {
//chainlog.Debug("ProcQueryTxMsg", "success", "ok")
msg.Reply(chain.client.NewMessage("rpc", types.EventTransactionDetail, TransactionDetail))
}
}
......
......@@ -164,13 +164,8 @@ func (chain *BlockChain) ProcQueryTxMsg(txhash []byte) (proof *types.Transaction
if err != nil {
return nil, err
}
TransactionDetail.Proofs = proofs
chainlog.Debug("ProcQueryTxMsg", "proofs", TransactionDetail.Proofs)
setTxDetailFromTxResult(&TransactionDetail, txresult)
chainlog.Debug("ProcQueryTxMsg", "TransactionDetail", TransactionDetail.String())
return &TransactionDetail, nil
}
......
......@@ -171,12 +171,12 @@ func (q *QueueProtocol) GetBlocks(param *types.ReqBlocks) (*types.BlockDetails,
func (q *QueueProtocol) QueryTx(param *types.ReqHash) (*types.TransactionDetail, error) {
if param == nil {
err := types.ErrInvalidParam
log.Error("QueryTx", "Error", err)
log.Debug("QueryTx", "Error", err)
return nil, err
}
msg, err := q.query(blockchainKey, types.EventQueryTx, param)
if err != nil {
log.Error("QueryTx", "Error", err.Error())
log.Debug("QueryTx", "Error", err.Error())
return nil, err
}
if reply, ok := msg.GetData().(*types.TransactionDetail); ok {
......
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