| 43 | } |
| 44 | |
| 45 | BOOST_AUTO_TEST_CASE(May15) |
| 46 | { |
| 47 | // Putting a 1MB binary file in the git repository is not a great |
| 48 | // idea, so this test is only run if you manually download |
| 49 | // test/data/Mar12Fork.dat from |
| 50 | // http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/Mar12Fork.dat/download |
| 51 | unsigned int tMay15 = 1368576000; |
| 52 | SetMockTime(tMay15); // Test as if it was right at May 15 |
| 53 | CAccountDBCache view(*pAccountViewTip, true); |
| 54 | CContractDBCache scriptDBCache(*pScriptDBTip, true); |
| 55 | CBlock forkingBlock; |
| 56 | if (read_block("Mar12Fork.dat", forkingBlock)) |
| 57 | { |
| 58 | CValidationState state; |
| 59 | |
| 60 | // After May 15'th, big blocks are OK: |
| 61 | forkingBlock.SetTime(tMay15); // Invalidates PoW |
| 62 | BOOST_CHECK(CheckBlock(forkingBlock, state, view, scriptDBCache, false, false)); |
| 63 | } |
| 64 | |
| 65 | SetMockTime(0); |
| 66 | } |
| 67 | |
| 68 | BOOST_AUTO_TEST_SUITE_END() |
| 69 | #endif //TODO |
nothing calls this directly
no test coverage detected