aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2016-01-21Get rid of inaccurate ScriptSigArgsExpectedPieter Wuille
2016-01-13Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY.mb300sd
Github-Pull: #7213 Rebased-From: 37d271d7cce44885f835292ffe99b54399b014d6
2016-01-05Bump copyright headers to 2015MarcoFalke
- Bump copyright headers to 2015 - [devtools] Rewrite fix-copyright-headers.py - [devtools] Use git pretty-format for year parsing Github-Pull: #7205 Rebased-From: fa6ad855e9159b2247da4fa0054f32fa181499ab fa24439ff3d8ab5b9efaf66ef4dae6713b88cb35 fa71669452e57039e4270fd2b33a0e0e1635b813
2015-12-14Replace trickle nodes with per-node/message Poisson delaysPieter Wuille
We used to have a trickle node, a node which was chosen in each iteration of the send loop that was privileged and allowed to send out queued up non-time critical messages. Since the removal of the fixed sleeps in the network code, this resulted in fast and attackable treatment of such broadcasts. This pull request changes the 3 remaining trickle use cases by random delays: * Local address broadcast (while also removing the the wiping of the seen filter) * Address relay * Inv relay (for transactions; blocks are always relayed immediately) The code is based on older commits by Patrick Strateman. Github-Pull: #7125 Rebased-From: 5400ef6bcb9d243b2b21697775aa6491115420f3
2015-12-04Replace setInventoryKnown with a rolling bloom filter.Gregory Maxwell
Github-Pull: #7133 Rebased-From: ec73ef37eccfeda76de55c4ff93ea54d4e69e1ec e20672479ef7f2048c2e27494397641d47a4d88d 6b849350ab074a7ccb80ecbef387f59e1271ded6 b6a0da45db8d534e7a77d1cebe382cd5d83ba9b8 d41e44c9accb3df84e0abbc602cc76b72754d382 aa4b0c26b0a94ca6164c441aae723e118554d214
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