From 5503effe3802e1ba5e47bfef377c7da5ba84d077 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Sat, 1 Jul 2017 16:57:55 +0000 Subject: [PATCH] rpcserver: Fix gettxout includemempool handling. When the includemempool parameter is set to true, transactions in the mempool should be additionally considered. However, the previous code used a buggy implementation which would return an error if this parameter was set and the transaction was not found in the mempool, without ever querying a mined utxo. --- rpcserver.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index 240eca7487..c6dbae360b 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -4005,11 +4005,8 @@ func handleGetTxOut(s *rpcServer, cmd interface{}, closeChan <-chan struct{}) (i } var txFromMempool *dcrutil.Tx if includeMempool { - txFromMempool, err = s.server.txMemPool.FetchTransaction(txHash, + txFromMempool, _ = s.server.txMemPool.FetchTransaction(txHash, true) - if err != nil { - return nil, rpcNoTxInfoError(txHash) - } } if txFromMempool != nil { mtx := txFromMempool.MsgTx()