Don't log error if getrawtransaction finds no tx.
ok @davecgh
This commit is contained in:
parent
6f17ebc8cb
commit
5966a5230d
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue