aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2015-12-02Merge pull request #7144Wladimir J. van der Laan
8f0d79e test: Disable scheduler test manythreads (Wladimir J. van der Laan)
2015-12-01Rewrite CreateNewBlockAlex Morcos
Use the score index on the mempool to only add sorted txs in order. Remove much of the validation while building the block, relying on mempool to be consistent and only contain txs that can be mined. The mempool is assumed to be consistent as far as not containing txs which spend non-existent outputs or double spends, and scripts are valid. Finality of txs is still checked (except not coinbase maturity, assumed in mempool). Still TestBlockValidity in case mempool consistency breaks and return error state if an invalid block was created. Unit tests are modified to realize that invalid blocks can now be constructed if the mempool breaks its consistency assumptions and also updated to have the right fees, since the cached value is now used for block construction. Conflicts: src/miner.cpp
2015-12-01Add a score index to the mempool.Alex Morcos
The score index is meant to represent the order of priority for being included in a block for miners. Initially this is set to the transactions modified (by any feeDelta) fee rate. Index improvements and unit tests by sdaftuar.
2015-12-01Store the total sig op count of a tx.Alex Morcos
Store sum of legacy and P2SH sig op counts. This is calculated in AcceptToMemory pool and storing it saves redoing the expensive calculation in block template creation.
2015-12-01test: Disable scheduler test manythreadsWladimir J. van der Laan
It causes occasional deadlocks, resulting in false negatives in Travis. Disable the test for now. Works around #6540.
2015-12-01Merge pull request #6915Wladimir J. van der Laan
2d8860e Fix removeForReorg to use MedianTimePast (Suhas Daftuar) b7fa4aa Don't call removeForReorg if DisconnectTip fails (Suhas Daftuar) 7e49f5f Track coinbase spends in CTxMemPoolEntry (Suhas Daftuar) bb8ea1f removeForReorg calls once-per-disconnect-> once-per-reorg (Matt Corallo) 474b84a Make indentation in ActivateBestChainStep readable (Matt Corallo) b0a064c Fix comment in removeForReorg (Matt Corallo) 9b060e5 Fix removal of time-locked transactions during reorg (Matt Corallo) 0c9959a Add failing test checking timelocked-txn removal during reorg (Matt Corallo)
2015-12-01Merge pull request #6914Wladimir J. van der Laan
114b581 Prevector type (Pieter Wuille)
2015-11-30Merge pull request #7072Gregory Maxwell
996d311 [RPC] Add transaction size to JSON output (Nick)
2015-11-30Track coinbase spends in CTxMemPoolEntrySuhas Daftuar
This allows us to optimize CTxMemPool::removeForReorg.
2015-11-28[RPC] Add transaction size to JSON outputNick
This may be useful for blockchain explorers.
2015-11-19Change GetPriority calculation.Alex Morcos
Compute the value of inputs that already are in the chain at time of mempool entry and only increase priority due to aging for those inputs. This effectively changes the CTxMemPoolEntry's GetPriority calculation from an upper bound to a lower bound.
2015-11-27Switch blocks to a constant-space Merkle root/branch algorithm.Pieter Wuille
This switches the Merkle tree logic for blocks to one that runs in constant (small) space. The old code is moved to tests, and a new test is added that for various combinations of block sizes, transaction positions to compute a branch for, and mutations: * Verifies that the old code and new code agree for the Merkle root. * Verifies that the old code and new code agree for the Merkle branch. * Verifies that the computed Merkle branch is valid. * Verifies that mutations don't change the Merkle root. * Verifies that mutations are correctly detected.
2015-11-27Merge pull request #7095Wladimir J. van der Laan
4ec3561 Replace scriptnum_test's normative ScriptNum implementation (Wladimir J. van der Laan)
2015-11-27Merge pull request #7053Wladimir J. van der Laan
2e29e7e Globals: Remove a bunch of Params() calls from main.cpp: (Jorge Timón)
2015-11-27Merge pull request #6134Wladimir J. van der Laan
e304432 Pass reference to estimateSmartFee and cleanup whitespace (Suhas Daftuar) 56106a3 Expose RPC calls for estimatesmart functions (Alex Morcos) e93a236 add estimateSmartFee to the unit test (Alex Morcos) 6303051 EstimateSmart functions consider mempool min fee (Alex Morcos) f22ac4a Increase success threshold for fee estimation to 95% (Alex Morcos) 4fe2823 Change wallet and GUI code to use new smart fee estimation calls. (Alex Morcos) 22eca7d Add smart fee estimation functions (Alex Morcos)
2015-11-27Merge pull request #5967Wladimir J. van der Laan
072e2f8 Alter assumptions in CCoinsViewCache::BatchWrite (Alex Morcos)
2015-11-25Replace scriptnum_test's normative ScriptNum implementationWladimir J. van der Laan
Compare against the scriptnum from Bitcoin Core 0.10 instead of OpenSSL. Closes #7086.
2015-11-23Globals: Remove a bunch of Params() calls from main.cpp:Jorge Timón
1) Chainparams: Explicit CChainParams arg for main: -AcceptBlock -AcceptBlockHeader -ActivateBestChain -ConnectTip -InitBlockIndex -LoadExternalBlockFile -VerifyDB parametric constructor 2) Also pickup more Params()\. in main.cpp 3) Pass nPruneAfterHeight explicitly to new FindFilesToPrune() in main.cpp
2015-11-20Merge pull request #6851Gregory Maxwell
3e7c891 Optimisation: Store transaction list order in memory rather than compute it every need (Luke Dashjr)
2015-11-21Optimisation: Store transaction list order in memory rather than compute it ↵Luke Dashjr
every need Huge performance improvement (450%) for zapwallettxes
2015-11-18Alter assumptions in CCoinsViewCache::BatchWriteAlex Morcos
Previously it would break if you flushed a parent cache while there was a child cache referring to it. This change will allow the flushing of parent caches.
2015-11-18Merge pull request #6932Wladimir J. van der Laan
1cf3dd8 Add unit test for UpdateCoins (Alex Morcos) 03c8282 Make CCoinsViewTest behave like CCoinsViewDB (Alex Morcos) 14470f9 ModifyNewCoins saves database lookups (Alex Morcos)
2015-11-16Implement helper class for CTxMemPoolEntry constructorAlex Morcos
This is only for unit tests.
2015-11-16Merge pull request #6986Gregory Maxwell
6bc9e40 Chainparams: Explicit CChainParams arg for miner: (Jorge Timón) 598e494 Chainparams: Explicit CChainParams arg for main (pre miner): (Jorge Timón)
2015-11-16add estimateSmartFee to the unit testAlex Morcos
2015-11-16Increase success threshold for fee estimation to 95%Alex Morcos
This provides more conservative estimates and reacts more quickly to a backlog. Unfortunately the unit test for fee estimation depends on the success threshold (and the decay) chosen; also modify the unit test for the new default success thresholds.
2015-11-15Switch to libsecp256k1-based validation for ECDSAPieter Wuille
2015-11-13Prevector typePieter Wuille
2015-11-13Fix bug in mempool_tests unit testAlex Morcos
2015-11-12Add unit test for UpdateCoinsAlex Morcos
2015-11-11Make CCoinsViewTest behave like CCoinsViewDBAlex Morcos
2015-11-11Chainparams: Explicit CChainParams arg for miner:Jorge Timón
-BitcoinMiner -CreateNewBlock -GenerateBitcoins -ProcessBlockFound
2015-11-11Chainparams: Explicit CChainParams arg for main (pre miner):Jorge Timón
-ProcessNewBlock -TestBlockValidity
2015-11-09[trivial] New DEFAULT_MIN_RELAY_TX_FEE = 1000MarcoFalke
2015-11-09transaction_tests: Be more strict checking dustMarcoFalke
* Don't allow off-by-one or more * Make clear dust is coupled with minRelayTxFee * Check rounding for odd values
2015-11-03Revert "Revert "Enable policy enforcing GetMedianTimePast as the end point ↵Gregory Maxwell
of lock-time constraints"" This reverts commit 8537ecdfc40181249ec37556015a99cfae4b21fd.
2015-11-02Merge pull request #6928Wladimir J. van der Laan
40cd32e Revert "Add rules--presently disabled--for using GetMedianTimePast as endpoint for lock-time calculations" (Gregory Maxwell) 8537ecd Revert "Enable policy enforcing GetMedianTimePast as the end point of lock-time constraints" (Gregory Maxwell)
2015-11-01Revert "Enable policy enforcing GetMedianTimePast as the end point of ↵Gregory Maxwell
lock-time constraints" This reverts commit dea8d21fc63e9f442299c97010e4740558f4f037.
2015-11-01tests: Initialize networking on windowsWladimir J. van der Laan
2015-10-27unittest: fix test for null tx inputDaniel Kraft
Update the unittest that is meant to catch a transaction that is invalid because it has a null input. The old test failed not because of that but because it was considered a coinbase with too large script. This is already checked with a different test, though. The new test is *not* a coinbase since it has two inputs, but one of them is null. This really checks the corresponding code path in CheckTransaction.
2015-10-26Merge pull request #6888Wladimir J. van der Laan
143d173 Use BOOST_CHECK_MESSAGE() rather than BOOST_CHECK() in alerts_tests.cpp and initialize strMiscWarning before calling PartitionCheck()." (Eric Lombrozo)
2015-10-25Use BOOST_CHECK_MESSAGE() rather than BOOST_CHECK() in alerts_tests.cpp and ↵Eric Lombrozo
initialize strMiscWarning before calling PartitionCheck()."
2015-10-23Enable policy enforcing GetMedianTimePast as the end point of lock-time ↵Mark Friedenbach
constraints Transactions are not allowed in the memory pool or selected for inclusion in a block until their lock times exceed chainActive.Tip()->GetMedianTimePast(). However blocks including transactions which are only mature under the old rules are still accepted; this is *not* the soft-fork required to actually rely on the new constraint in production.
2015-10-23Merge pull request #6873Jeff Garzik
2015-10-22leveldbwrapper file rename to dbwrapper.*Jeff Garzik
2015-10-22leveldbwrapper symbol rename: Remove "Level" from class, etc. namesJeff Garzik
2015-10-22Merge pull request #6848Wladimir J. van der Laan
c6824f8 Add DERSIG transaction test cases (J Ross Nicoll)
2015-10-21Merge pull request #6722Wladimir J. van der Laan
58254aa Fix stale comment in CTxMemPool::TrimToSize. (Matt Corallo) 2bc5018 Fix comment formatting tabs (Matt Corallo) 8abe0f5 Undo GetMinFee-requires-extra-call-to-hit-0 (Matt Corallo) 9e93640 Drop minRelayTxFee to 1000 (Matt Corallo) 074cb15 Add reasonable test case for mempool trimming (Matt Corallo) d355cf4 Only call TrimToSize once per reorg/blocks disconnect (Matt Corallo) 794a8ce Implement on-the-fly mempool size limitation. (Matt Corallo) e6c7b36 Print mempool size in KB when adding txn (Matt Corallo) 241d607 Add CFeeRate += operator (Matt Corallo) e8bcdce Track (and define) ::minRelayTxFee in CTxMemPool (Matt Corallo) 9c9b66f Fix calling mempool directly, instead of pool, in ATMP (Matt Corallo) 49b6fd5 Add Mempool Expire function to remove old transactions (Pieter Wuille) 78b82f4 Reverse the sort on the mempool's feerate index (Suhas Daftuar)
2015-10-20Merge pull request #6235Wladimir J. van der Laan
55a8975 Chainparams: Translations: DRY: options and error strings (Jorge Timón) f3525e2 Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir) (Jorge Timón)
2015-10-20Chainparams: Replace CBaseChainParams::Network enum with string constants ↵Jorge Timón
(suggested by Wladimir)