Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
rpcserver: Fix gettxout includemempool handling.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jrick committed Jul 1, 2017
1 parent 7131649 commit 5503eff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5503eff

Please sign in to comment.