aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorAlex Morcos <[email protected]>2017-06-08 10:41:19 -0400
committerAlex Morcos <[email protected]>2017-06-27 14:14:15 -0400
commit18bacec6c2c8493fd6b7011778446b3c7473bb25 (patch)
tree8a6f2be4ec128d74dc9f0add6342a794cafcb1cb /src/httpserver.cpp
parentMerge #10118: Util: Remove redundant calls to argsGlobal.IsArgSet() (diff)
downloaddiscoin-18bacec6c2c8493fd6b7011778446b3c7473bb25.tar.xz
discoin-18bacec6c2c8493fd6b7011778446b3c7473bb25.zip
Make check to distinguish between orphan txs and old txs more efficient.
Checking for the existence in the CCoinsViewCache of the outputs of a new tx will result in a disk hit for every output since they will not be found. On the other hand if those outputs exist already, then the inputs must also have been missing, so we can move this check inside the input existence check so in the common case of a new tx it doesn't need to run. The purpose of the check is to avoid spamming the orphanMap with slightly old txs which we have already seen in a block, but it is already only optimistic (depending on the outputs not being spent), so make it even more efficient by only checking the cache and not the entire pcoinsTip.
Diffstat (limited to 'src/httpserver.cpp')
0 files changed, 0 insertions, 0 deletions