aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement accurate memory accounting for mempoolPieter Wuille2015-07-101-1/+13
|
* Fix various warningsLuke Dashjr2015-06-231-1/+1
| | | | Found while building on Debian 7
* Consensus: MOVEONLY: Move CValidationState from main consensus/validationjtimon2015-05-151-0/+1
|
* Merge pull request #5159Wladimir J. van der Laan2015-05-131-353/+29
|\ | | | | | | b649e03 Create new BlockPolicyEstimator for fee estimates (Alex Morcos)
| * Create new BlockPolicyEstimator for fee estimatesAlex Morcos2015-05-131-353/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class groups transactions that have been confirmed in blocks into buckets, based on either their fee or their priority. Then for each bucket, the class calculates what percentage of the transactions were confirmed within various numbers of blocks. It does this by keeping an exponentially decaying moving history for each bucket and confirm block count of the percentage of transactions in that bucket that were confirmed within that number of blocks. -Eliminate txs which didn't have all inputs available at entry from fee/pri calcs -Add dynamic breakpoints and tracking of confirmation delays in mempool transactions -Remove old CMinerPolicyEstimator and CBlockAverage code -New smartfees.py -Pass a flag to the estimation code, using IsInitialBlockDownload as a proxy for when we are still catching up and we shouldn't be counting how many blocks it takes for transactions to be included. -Add a policyestimator unit test
* | Consensus: Create consensus/consensus.h with some constantsjtimon2015-04-201-0/+1
|/
* Keep mempool consistent during block-reorgsGavin Andresen2015-03-261-0/+12
| | | | | | | | | | | | | | | | This fixes a subtle bug involving block re-orgs and non-standard transactions. Start with a block containing a non-standard transaction, and one or more transactions spending it in the memory pool. Then re-org away from that block to another chain that does not contain the non-standard transaction. Result before this fix: the dependent transactions get stuck in the mempool without their parent, putting the mempool in an inconsistent state. Tested with a new unit test.
* src/txmempool.cpp: make numEntries a uint32_tWladimir J. van der Laan2015-03-061-2/+2
| | | | | Don't ever serialize a size_t or long, their sizes are platform dependent.
* Remove whitespaces before double colon in errors and logsPavel Janík2015-01-311-4/+4
|
* Decouple miner.o and txmempool.o from CTxUndojtimon2014-12-271-4/+3
|
* Merge pull request #5481Wladimir J. van der Laan2014-12-231-8/+18
|\ | | | | | | 6484930 Apply AreSane() checks to the fees from the network. (Gregory Maxwell)
| * Apply AreSane() checks to the fees from the network.Gregory Maxwell2014-12-151-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'Sane' was already defined by this code as: fee.GetFeePerK() > minRelayFee.GetFeePerK() * 10000 But sanity was only enforced for data loaded from disk. Note that this is a pretty expansive definition of 'sane': A 10 BTC fee is still passes the test if its on a 100kb transaction. This prevents a single insane fee on the network from making us reject our stored fee data at start. We still may reject valid saved fee state if minRelayFee is changed between executions. This also reduces the risk and limits the damage from a cascading failure where one party pays a bunch of insane fees which cases others to pay insane fees.
* | Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | | | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* | make all catch() arguments constPhilip Kaufmann2014-12-171-2/+2
| | | | | | | | | | | | | | - I saw this on http://en.cppreference.com/w/cpp/language/try_catch and thought it would be a good idea - also unify used format to better be able to search for exception uses in our codebase
* | Fix small typos in comments and error messagesPavel Janík2014-12-161-2/+2
|/ | | | | Rebased-From: 67b2d819cdf6181e7f016e5366ce7479830893bd Github-Pull: #5404
* Make CTxMemPool::remove more effecient by avoiding recursionMatt Corallo2014-12-081-12/+18
|
* Make CTxMemPool::check more thourough by using CheckInputsMatt Corallo2014-12-081-1/+29
|
* Remove txn which are invalidated by coinbase maturity during reorgMatt Corallo2014-12-081-0/+26
|
* Update comments in txmempool to be doxygen compatibleMichael Ford2014-11-171-14/+24
| | | | Fix typo in Read() error message
* minor cleanup: include orders, end comments etc.Philip Kaufmann2014-10-311-3/+3
| | | | - no code changes
* Separate protocol versioning from clientversionCory Fields2014-10-291-0/+1
|
* MOVEONLY: Separate CTransaction and dependencies from corejtimon2014-10-271-1/+0
|
* boost: split stream classes out of serialize.hCory Fields2014-10-221-0/+1
| | | | serialization now has no dependencies.
* script: add a slew of includes all around and drop includes from script.hCory Fields2014-10-171-0/+1
| | | | Lots of files ended up with indirect includes from script.h.
* Merge pull request #4834Pieter Wuille2014-10-081-1/+1
|\ | | | | | | | | | | | | | | 7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille) ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille) 058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille) c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille) f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
| * Get rid of the dummy CCoinsViewCache constructor argPieter Wuille2014-09-241-1/+1
| |
* | Use a typedef for monetary valuesMark Friedenbach2014-09-261-8/+9
|/
* add nModSize init to default constructor of CTxMemPoolEntryPhilip Kaufmann2014-09-161-1/+1
|
* Merge pull request #4911Pieter Wuille2014-09-161-2/+2
|\ | | | | | | 611116d header include cleanup (Philip Kaufmann)
| * header include cleanupPhilip Kaufmann2014-09-141-2/+2
| | | | | | | | - ensures alphabetical ordering for includes etc. in source file headers
* | Fixing compiler warning C4101ENikS2014-09-151-2/+2
| | | | | | | | Github-Pull: #4856
* | Merge pull request #4817Pieter Wuille2014-09-151-1/+3
|\ \ | |/ |/| | | c26649f Track modified size in TxMemPoolEntry so that we can correctly compute priority. (Alex Morcos)
| * Track modified size in TxMemPoolEntry so that we can correctly compute priority.Alex Morcos2014-09-081-1/+3
| |
* | Merge pull request #4822Pieter Wuille2014-09-101-2/+2
|\ \ | | | | | | | | | 629d75f Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins. (Pieter Wuille)
| * | Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins.Pieter Wuille2014-09-031-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | The efficient version of CCoinsViewCache::GetCoins only works for known-to-exist cache entries, requiring a separate HaveCoins call beforehand. This is inefficient as both perform a hashtable lookup. Replace the non-mutable GetCoins with AccessCoins, which returns a potentially-NULL pointer. This also decreases the overloading of GetCoins. Also replace some copying (inefficient) GetCoins calls with equivalent AccessCoins, decreasing the copying.
* / Remove some unnecessary c_strs() in logging and the GUIPhilip Kaufmann2014-09-091-1/+1
|/ | | | | Includes `core: remove unneeded c_str() / Qt: replace c_str() with Qt code` by P. Kaufmann.
* Fix a few "Uninitialized scalar field" warningsWladimir J. van der Laan2014-08-281-2/+5
| | | | | | Fix a few warnings reported by Coverity. None of these is critical, but making sure that class fields are initialized can avoid heisenbugs.
* Merge pull request #4748Pieter Wuille2014-08-261-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | ad49c25 Split up util.cpp/h (Wladimir J. van der Laan) f841aa2 Move `COIN` and `CENT` to core.h (Wladimir J. van der Laan) 6e5fd00 Move `*Version()` functions to version.h/cpp (Wladimir J. van der Laan) b4aa769 Move `S_I*` constants and `MSG_NOSIGNAL` to compat.h (Wladimir J. van der Laan) af8297c Move functions in wallet.h to implementation file (Wladimir J. van der Laan) 651480c move functions in main and net to implementation files (Wladimir J. van der Laan) 610a8c0 Move SetThreadPriority implementation to util.cpp instead of the header (Wladimir J. van der Laan) f780e65 Remove unused function `ByteReverse` from util.h (Wladimir J. van der Laan) 121d6ad Remove unused `alignup` function from util.h (Wladimir J. van der Laan) d1e26d4 Move CMedianFilter to timedata.cpp (Wladimir J. van der Laan)
| * Split up util.cpp/hWladimir J. van der Laan2014-08-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
* | Use const CCoinsView's at some places.Daniel Kraft2014-08-261-2/+2
| | | | | | | | | | At some places where it is possible (e. g., CheckInputs), use a const version of CCoinsView instead of a non-const one.
* | Make appropriate getter-routines "const" in CCoinsView.Daniel Kraft2014-08-261-2/+2
|/ | | | Mark the "Get"/"Have" routines in CCoinsView and subclasses as "const".
* Closely track mempool byte total. Add "getmempoolinfo" RPC.Jeff Garzik2014-08-141-0/+9
| | | | | Goal: Gain live insight into the mempool. Groundwork for future work that caps mempool size.
* Process fee estimate file into temporary vector first to let sanity checking ↵Alex Morcos2014-07-291-4/+15
| | | | complete.
* Fix minor bug which only affected log messages.Alex Morcos2014-07-281-2/+6
|
* Fixed a bug with index bounds checkingAlex Morcos2014-07-271-1/+1
|
* Bugfix: make CCoinsViewMemPool support pruned entries in underlying cachePieter Wuille2014-07-231-3/+4
|
* Revert "Relay double-spends, subject to anti-DOS"Wladimir J. van der Laan2014-07-211-0/+1
| | | | This reverts commit d640a3ceab4f4372c2a0f738c1286cfde4b41b50.
* Move fee policy out of coreGavin Andresen2014-07-031-13/+13
|
* Sanity checks for estimatesGavin Andresen2014-07-031-2/+7
| | | | | | | Require at least 11 samples before giving fee/priority estimates. And have wallet-created transactions go throught the fee-sanity-check code path.
* Relay double-spends, subject to anti-DOSTom Harding2014-06-271-1/+0
| | | | | | | | | | | | | | | | | | | | Allows network wallets and other clients to see transactions that respend a prevout already spent in an unconfirmed transaction in this node's mempool. Knowledge of an attempted double-spend is of interest to recipients of the first spend. In some cases, it will allow these recipients to withhold goods or services upon being alerted of a double-spend that deprives them of payment. As before, respends are not added to the mempool. Anti-Denial-of-Service-Attack provisions: - Use a bloom filter to relay only one respend per mempool prevout - Rate-limit respend relays to a default of 100 thousand bytes/minute - Define tx2.IsEquivalentTo(tx1): equality when scriptSigs are not considered - Do not relay these equivalent transactions Remove an unused variable declaration in txmempool.cpp.