From 5966a5230d7f6c3ed98521549cdd6763902e003f Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Thu, 3 Jul 2014 10:30:46 -0500 Subject: [PATCH] Don't log error if getrawtransaction finds no tx. ok @davecgh --- rpcserver.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcserver.go b/rpcserver.go index e6faf2d7..a64f390f 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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