aboutsummaryrefslogtreecommitdiff
path: root/src/test/miner_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #6222Wladimir J. van der Laan2015-06-101-0/+1
|\ | | | | | | efd4444 Explicitly set tx.nVersion for the genesis block and mining tests (Mark Friedenbach)
| * Explicitly set tx.nVersion for the genesis block and mining testsMark Friedenbach2015-06-021-0/+1
| | | | | | | | If/when CTransaction::CURRENT_VERSION is incremented, this will break CChainParams and the miner tests. This fix sets the transaction version explicitly where we depend on the hash value (genesis block, proof of work checks).
* | Be stricter in processing unrequested blocksSuhas Daftuar2015-06-021-1/+1
|/ | | | | AcceptBlock will no longer process an unrequested block, unless it has not been previously processed and has more work than chainActive.Tip()
* Merge pull request #6183Wladimir J. van der Laan2015-06-011-4/+6
|\ | | | | | | 28bf062 Fix off-by-one error w/ nLockTime in the wallet (Peter Todd)
| * Fix off-by-one error w/ nLockTime in the walletPeter Todd2015-05-271-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously due to an off-by-one error the wallet ignored nLockTime-by-height transactions that would be valid in the next block even though they are accepted into the mempool. The transactions wouldn't show up until confirmed, nor would they be included in the unconfirmed balance. Similar to the mempool behavior fix in 665bdd3b, the wallet code was calling IsFinalTx() directly without taking into account the fact that doing so tells you if the transaction could have been mined in the *current* block, rather than the next block. To fix this we strip IsFinalTx() of non-consensus-critical functionality, removing the default arguments, and add CheckFinalTx() to check if a transaction will be final in the next block.
* | Consensus: MOVEONLY: Move CValidationState from main consensus/validationjtimon2015-05-151-0/+1
|/
* checkpoints: move the checkpoints enable boolean into mainCory Fields2015-04-301-2/+2
| | | | | This pertains to app-state, so it doesn't make sense to handle inside the checkpoint functions.
* Revert mining changes in #5957Wladimir J. van der Laan2015-04-101-14/+13
| | | | | | | This reverts commit e2edf95cd3f43331843676e49a82830128a95050 6b04508e37c5dd18cec1cd61cc4356bd208aa991 0df67f1f7ab4adfe9f0b3ba6276e737b37826464, except the changes to the RPC tests. A `generate` RPC call is introduced based on the old code.
* Bugfix: make CreateNewBlock return pindexPrevPieter Wuille2015-04-011-13/+14
|
* Reinitialize state in between individual unit tests.Pieter Wuille2015-03-031-1/+3
| | | | | This changes the TestingSetup fixture to be per-unit-test rather than global. Most tests don't need it, so it's only invoked in a few.
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* Merge pull request #1816Wladimir J. van der Laan2014-11-241-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | b867e40 CreateNewBlock: Stick height in coinbase so we pass template sanity check (Luke Dashjr) 60755db submitblock: Check for duplicate submissions explicitly (Luke Dashjr) bc6cb41 QA RPC tests: Add tests block block proposals (Luke Dashjr) 9765a50 Implement BIP 23 Block Proposal (Luke Dashjr) 3dcbb9b Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblock (Luke Dashjr) 132ea9b miner_tests: Disable checkpoints so they don't fail the subsidy-change test (Luke Dashjr) df08a62 TestBlockValidity function for CBlock proposals (used by CreateNewBlock) (Luke Dashjr) 4ea1be7 CreateNewBlock and miner_tests: Also check generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock (Luke Dashjr) a48f2d6 Abstract context-dependent block checking from acceptance (Luke Dashjr)
| * miner_tests: Disable checkpoints so they don't fail the subsidy-change testLuke Dashjr2014-11-181-0/+2
| |
* | Merge pull request #5162Wladimir J. van der Laan2014-11-041-0/+1
|\ \ | |/ |/| | | | | | | d2e74c5 boost: moveonly: split CPubKey and friends to new files (Cory Fields) 78c228c boost: moveonly: move BIP32Hash to hash.h (Cory Fields) 900078a boost: moveonly: create eccryptoverify.h|cpp and move helper functions there (Cory Fields)
| * boost: moveonly: split CPubKey and friends to new filesCory Fields2014-10-311-0/+1
| |
* | Merge pull request #5106Wladimir J. van der Laan2014-11-031-1/+1
|\ \ | |/ |/| | | | | | | | | 1bea2bb Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and document it (Luke Dashjr) d29a291 Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and use RPC_VERIFY_ERROR for submitblock (Luke Dashjr) f877aaa Bugfix: submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock, now that it no longer does the full block validity check (Luke Dashjr) 24e8896 Add CValidationInterface::BlockChecked notification (Luke Dashjr)
| * Rename ProcessBlock to ProcessNewBlock to indicate change of behaviour, and ↵Luke Dashjr2014-10-281-1/+1
| | | | | | | | document it
* | script: move CScriptID to standard.h and add a ctor for creating them from ↵Cory Fields2014-10-171-1/+1
|/ | | | | | | | | | | | | | | | CScripts This allows for a reversal of the current behavior. This: CScript foo; CScriptID bar(foo.GetID()); Becomes: CScript foo; CScriptID bar(foo); This way, CScript is no longer dependent on CScriptID or Hash();
* Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-10-021-0/+1
| | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* Revert merge of pull #4845Wladimir J. van der Laan2014-10-021-1/+0
| | | | | | | | | | | It breaks the new mingw tests! See - https://travis-ci.org/bitcoin/bitcoin/jobs/36845581 - https://travis-ci.org/bitcoin/bitcoin/jobs/36845582 This reverts commit 470590277782cce2fe73275c74523aef59a51eab, 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0, a25fd6be138ff2bff7e2ad6a1a789db523c0193f.
* Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-09-291-0/+1
| | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* Move CTxDestination from script/script to script/standardPieter Wuille2014-09-161-1/+1
|
* Add CMutableTransaction and make CTransaction immutable.Pieter Wuille2014-06-211-5/+7
| | | | | In addition, introduce a cached hash inside CTransaction, to prevent recalculating it over and over again.
* Switch miner.cpp to use sha2 instead of OpenSSL.Pieter Wuille2014-06-211-28/+0
|
* Add licenses for tests and test dataWladimir J. van der Laan2014-03-181-1/+3
| | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* Fix off-by-one errors in use of IsFinalTx()Peter Todd2014-01-261-1/+50
| | | | | | | | | | | | | | Previously CreateNewBlock() didn't take into account the fact that IsFinalTx() without any arguments tests if the transaction is considered final in the *current* block, when both those functions really needed to know if the transaction would be final in the *next* block. Additionally the UI had a similar misunderstanding. Also adds some basic tests to check that CreateNewBlock() is in fact mining nLockTime-using transactions correctly. Thanks to Wladimir J. van der Laan for rebase.
* Make bitcoin compile without wallet if "db_cxx.h" is not presentThomas Holenstein2013-12-191-1/+0
| | | | | Moved includes of "db.h" into #ifdef ENABLE_WALLET blocks or remove them.
* Re-enable miner tests in --disable-wallet modeWladimir J. van der Laan2013-12-091-13/+12
| | | | | | Use a fixed script instead of a CReserveKey from the wallet. This does not affect the functionality or result of the tests as they never check the state of the wallet in the first place.
* Make unit tests succeed with -DDEBUG_LOCKORDERGavin Andresen2013-12-021-0/+2
|
* Add verbose boolean to getrawmempoolGavin Andresen2013-11-301-10/+10
| | | | | Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-3/+5
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Refactor/encapsulate chain globals into a CChain classPieter Wuille2013-10-111-6/+6
|
* Fix minor unit test memory leaksPieter Wuille2013-09-191-0/+4
|
* CreateNewBlock() now takes scriptPubKey argument,Jeff Garzik2013-08-241-11/+11
| | | | | | | rather than a key. CreateNewBlockWithKey() helper is added to restore existing functionality, making this an equivalent-transformation change.
* Move internal miner/block creation to separate miner.cpp module.Jeff Garzik2013-07-311-0/+1
| | | | Public functions referenced elsewhere are added to miner.h.
* CValidationState frameworkPieter Wuille2013-01-301-1/+3
|
* changed CreateNewBlock to return a CBlockTemplate object, which includes ↵Forrest Voight2012-12-191-22/+23
| | | | per-tx fee and sigop count data
* Set block.nVersion to fix miner unit testGavin Andresen2012-08-201-0/+1
|
* Tests for CreateNewBlockLuke Dashjr2012-07-121-0/+190
|
* Fix tests after recent refactorsPieter Wuille2012-04-171-1/+2
|
* Rework unit tests so test_bitcoin.cpp does not #include them allGavin Andresen2011-12-191-1/+1
|
* Fix miner_test unit test bugGavin Andresen2011-10-051-3/+3
|
* remove cryptopp dependency, add simple unittest for SHA256Transform()Nils Schneider2011-09-301-0/+35