Don't log error if getrawtransaction finds no tx.

ok @davecgh
This commit is contained in:
Josh Rickmar 2014-07-03 10:30:46 -05:00
parent 6f17ebc8cb
commit 5966a5230d

View file

@ -1508,10 +1508,13 @@ func handleGetRawTransaction(s *rpcServer, cmd btcjson.Cmd, closeChan <-chan str
tx, err := s.server.txMemPool.FetchTransaction(txSha)
if err != nil {
txList, err := s.server.db.FetchTxBySha(txSha)
if err != nil || len(txList) == 0 {
if err != nil {
rpcsLog.Errorf("Error fetching tx: %v", err)
return nil, btcjson.ErrNoTxInfo
}
if len(txList) == 0 {
return nil, btcjson.ErrNoTxInfo
}
lastTx := len(txList) - 1
mtx = txList[lastTx].Tx