Enforce remaining softfork activation rules unconditionally.

This commit is contained in:
Sean Bowe 2016-06-14 09:48:02 -06:00
parent b3be1ef529
commit 542da618df
2 changed files with 118 additions and 130 deletions

View File

@ -2037,13 +2037,13 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
// Start enforcing the DERSIG (BIP66) rules, for block.nVersion=3 blocks,
// when 75% of the network has upgraded:
if (block.nVersion >= 3 && IsSuperMajority(3, pindex->pprev, chainparams.GetConsensus().nMajorityEnforceBlockUpgrade, chainparams.GetConsensus())) {
if (block.nVersion >= 3) {
flags |= SCRIPT_VERIFY_DERSIG;
}
// Start enforcing CHECKLOCKTIMEVERIFY, (BIP65) for block.nVersion=4
// blocks, when 75% of the network has upgraded:
if (block.nVersion >= 4 && IsSuperMajority(4, pindex->pprev, chainparams.GetConsensus().nMajorityEnforceBlockUpgrade, chainparams.GetConsensus())) {
if (block.nVersion >= 4) {
flags |= SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY;
}
@ -3013,19 +3013,9 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d)", __func__, nHeight));
}
// Reject block.nVersion=1 blocks when 95% (75% on testnet) of the network has upgraded:
if (block.nVersion < 2 && IsSuperMajority(2, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
return state.Invalid(error("%s: rejected nVersion=1 block", __func__),
REJECT_OBSOLETE, "bad-version");
// Reject block.nVersion=2 blocks when 95% (75% on testnet) of the network has upgraded:
if (block.nVersion < 3 && IsSuperMajority(3, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
return state.Invalid(error("%s : rejected nVersion=2 block", __func__),
REJECT_OBSOLETE, "bad-version");
// Reject block.nVersion=3 blocks when 95% (75% on testnet) of the network has upgraded:
if (block.nVersion < 4 && IsSuperMajority(4, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
return state.Invalid(error("%s : rejected nVersion=3 block", __func__),
// Reject block.nVersion < 4 blocks
if (block.nVersion < 4)
return state.Invalid(error("%s : rejected nVersion<4 block", __func__),
REJECT_OBSOLETE, "bad-version");
return true;
@ -3049,7 +3039,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
// Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
// if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
if (block.nVersion >= 2 && IsSuperMajority(2, pindexPrev, consensusParams.nMajorityEnforceBlockUpgrade, consensusParams))
if (block.nVersion >= 2)
{
CScript expect = CScript() << nHeight;
if (block.vtx[0].vin[0].scriptSig.size() < expect.size() ||

View File

@ -24,116 +24,116 @@ struct {
const char *nonce_hex;
uint32_t vSolutions[NUM_EQUIHASH_SOLUTIONS];
} blockinfo[] = {
{"0000000000000000000000000000000000000000000000000000000000000000", {1505683,9304455,10114563,22791213,4035556,9345213,16397229,25618807,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {424096,20333317,10622499,20209226,6884666,27470139,23474454,30531201,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2179663,27008838,7162220,11963499,5092907,18014816,28361015,31223796,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {303751,21454192,8761201,12598180,4577837,29015619,20421055,22955596,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1751790,19856152,8574507,16953069,4251312,13393763,5955453,28913023,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {785184,14253319,24484102,27390835,1317570,12730552,16069105,29576909,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1718219,27413934,2674938,15453490,13954323,25472379,16189626,19128343,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {629365,1981622,1749373,24877483,8217463,18016882,14658154,27211901,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1688422,3318138,17890535,32625825,12604028,31950324,14297499,19466358,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {6533168,12680284,12068506,12751411,12567359,27540043,12768573,16069354,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {968090,8442388,1117421,7976193,14006881,31798833,18085134,20401083,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {3514701,12360162,5234778,5999621,11789340,18832893,22869850,23439344,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2575979,27830265,13819669,22742927,3121997,13349293,6263893,15290297,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {5062267,7659171,14486124,23330332,11966804,24824323,14038938,18878817,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {11213446,20265755,12893621,23017856,16734884,31765345,21333472,23827684,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {5518261,30764760,12823014,13655635,7134888,32813890,11382973,17173863,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {664025,15589977,1951845,15881472,1451881,20455835,14830157,31859267,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1381023,8353598,5447556,7981905,3286916,28307849,12223998,24222776,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2270156,9693893,7097804,33155995,5209943,24608558,23175278,23996312,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {598743,7549066,12220120,16548000,1187946,6360178,9203030,20938470,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {7169872,31048822,17475729,28022573,14929725,33419266,19983803,21561441,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {823149,1383285,2864831,18895121,4028941,6686607,23910447,28604567,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2182559,17932563,5472524,13379261,8567276,32616974,13001732,29914746,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {8611685,24932345,31206257,33073835,19148378,25317035,19310180,22845583,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {83068,29700240,3972272,6850295,9153017,29691329,22889643,28586890,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {2036436,33222933,10430117,26029089,14468206,23205454,16914535,23655899,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {54367,28431614,4046008,18177082,6036369,11490568,10955988,30899748,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2546890,18985534,25329149,33071236,4813628,14855283,9753607,18836650,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {10805583,19004556,28249173,32689480,11182279,15314398,16390145,19761642,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {165667,26786566,1226777,1745893,3573753,20991068,16300414,25762822,}},
{"0000000000000000000000000000000000000000000000000000000000000003", {62918,4072570,4440776,26738888,3934004,19477034,20612480,32574298,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1719533,12082749,11189320,14802151,1932592,6082360,3182419,15839619,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {3264146,31555777,9558781,24052145,3492269,12679179,20287639,24428614,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {9620201,29437274,12503846,23031898,12057554,20334741,13655193,19216975,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {7885417,28251852,18863119,30898457,15346252,26882297,18476594,21100099,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {240010,13062691,13209296,15801269,5482499,6697795,20389947,30871777,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1069937,5009862,20476681,21883864,3816975,18168447,12966753,27204663,}},
{"0000000000000000000000000000000000000000000000000000000000000003", {4720504,28475581,30132313,32996687,15421528,33006056,19410498,32808177,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {3375419,19887018,3583901,18414401,4072420,5558293,9497494,22664087,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2812898,30205959,7980517,16869166,10455874,11175055,28088879,29386025,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {91377,8095055,15028975,21569250,7121267,23141695,10638134,22152880,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {5320074,19134224,5908808,20417182,9802516,29176362,11327661,27117599,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2304141,20069153,19299006,32940065,4897139,26940432,31702454,32395918,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2183041,9634135,32043677,33261946,18256807,30835923,19504088,20654921,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {7646265,16434464,9910305,18212419,12149694,22678629,32034346,32963185,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {924537,5073683,1803756,28393103,21164203,30767320,21433406,22064835,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2606837,19557323,21550527,21601365,6848017,22514207,25667860,30755108,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {131529,17520841,8190594,12399429,1736902,29945839,25566017,31113393,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {74277,30398806,5823084,26201084,4363661,31286936,8937184,25310621,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {5629775,21833920,16203890,25997616,6778531,10871927,26779945,32073815,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {7360230,29863781,8172797,25440735,9306446,31827129,10966698,20794387,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1020818,19742792,2996289,3324122,4671579,8811651,9334761,25096551,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {6257905,25988186,21198798,27940315,11405239,18843426,13218595,16970291,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {3661427,29865559,4313400,13731482,5384386,9968554,13573546,18976286,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {297493,14307372,3086420,11769568,1531156,33417896,16891836,26835748,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {850439,939868,16088315,17847062,1459858,18852207,21613990,31341287,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1498173,5659035,3580647,9784724,7042945,27605458,13983089,21772555,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {265300,25657381,5837906,32684326,6197029,26496479,11782433,28354118,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {4235902,8416342,16760709,18644724,9088314,21041118,16132732,19921969,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {7054865,20285428,13191729,31228813,7505236,24662594,21292235,27185614,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {805354,2124453,6739370,31189471,19047536,20922898,19270405,25919260,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1250066,15110709,6902216,30436877,17319807,22578956,25091517,30273798,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {5860838,12990745,6387378,25809956,16172365,27030579,20735436,22490295,}},
{"0000000000000000000000000000000000000000000000000000000000000003", {2907633,29738850,19732451,33309735,11787163,13756425,15433747,25267074,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {5804619,14577145,23001890,25863602,15458582,17688201,21112935,29728563,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1688425,18136649,4537229,13269806,3269606,8593962,12360926,33488147,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1665070,25244052,10550119,32208768,5137014,8320231,16775388,27839194,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {8311110,18046143,12839548,22041548,13420948,13944339,18677700,30812557,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {4390682,27036744,19696521,24884392,4681756,23237938,25816582,32996775,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1477153,6568369,21857553,29435914,6140396,22576862,7262979,19002076,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {2965409,8684457,14803533,17967084,5354409,24881786,11719903,14361443,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {5102862,17625845,28100560,28357633,17222636,18254369,18018129,30189744,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {5708850,27621214,13753873,29665262,12657384,30563632,17310655,27915369,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {2621572,12689538,4630982,29901889,3629010,6756957,3677965,30610562,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {6500643,24447105,7448249,19069836,7887394,13551853,20649165,28423060,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {2036368,6750468,15795769,15825950,19238166,20733230,26877439,27642252,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1652218,13634797,12191514,32332965,6697455,11150626,14892178,19111832,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {111950,30863388,8779039,26464089,10089865,12353207,11894521,14091302,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {3078281,23872429,20954798,21282269,4882746,21043227,7172181,33550236,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {3503224,25625938,18816585,29803345,3951932,12591146,6670269,15890043,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {605872,33319409,1817073,12822625,20032228,27403095,23666911,27183623,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1766741,14384326,5278687,22979584,2203181,32152823,3183017,10965482,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {3169640,23411466,3176871,23877547,16430704,19991138,24227956,28550729,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {233750,13283920,15875314,27705359,6749492,16980557,13229511,13859447,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1077756,26076907,2621177,14078132,4915880,8647511,29725443,32637495,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1752795,25529160,13826361,21067812,6077322,28675496,24371900,30366250,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1546413,6490653,19447435,27055625,9234404,9968283,20817365,28434279,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2468906,31932096,3450912,22420554,6120742,15406354,30836680,32518512,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2123031,24896642,7125942,24921615,12317438,24914782,14264318,32418155,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {3353184,6915242,5315514,15444924,6518261,16708409,24086722,25093861,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {857291,31955694,8619476,13282852,5131527,18688880,19863466,19950736,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1739656,25530805,3754388,6793402,15290893,29035753,29565345,30305622,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {2611937,27825146,10822599,15545335,5617357,29278495,15877832,17901616,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {3831314,7379114,18116475,23520810,14414038,21954620,18383396,27660414,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {7130501,27003497,14460801,23267542,9842198,21710006,20485258,25867107,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2508815,15933718,29539325,32090536,4829668,10149214,26025842,27744647,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {279100,29887493,785496,18973521,2321564,14770369,20866351,31894781,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1699206,29970967,5475930,14850478,4783802,13945615,16786338,16900692,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1744255,6901279,7349326,32108795,3573261,15043801,16532064,22293749,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1559827,5877322,1737945,18114144,3789777,18167812,18370250,31124870,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1116048,17556996,8840198,29420603,20557703,20953366,30328439,30663015,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {798196,16377273,22015317,22772453,5946638,18262318,13868482,23874803,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {257224,19262005,22082724,22118460,7866566,25856702,14611593,20556202,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1155318,18602392,18835625,19453594,15574365,25501175,26620735,29546443,}},
{"0000000000000000000000000000000000000000000000000000000000000004", {1118617,21836063,21221995,26806476,18126093,20913596,18777695,32729986,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {4113293,20842387,8047389,14992088,5113685,11404673,19908238,27527216,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1907186,28213894,13785483,22598351,2314631,32975665,17852278,26847039,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1452278,11354301,1662083,19787092,1800371,12918477,22475783,23758259,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {219653,29803795,9124713,9874906,14412340,23444473,16935535,21346968,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {17292969,19730374,18717002,28865642,20109525,30112035,20906344,26953734,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {216352,1018708,14037601,29429704,2494796,27147383,6675934,20511572,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {7863867,29124064,11004490,28155225,10050349,13402943,28382859,33286112,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {169471,19337013,4335518,10566558,9120654,28984284,22081278,23569130,}},
{"0000000000000000000000000000000000000000000000000000000000000004", {2411047,9766097,5865562,11493500,6886640,24323826,24014251,24058081,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {4598434,31961097,26380422,26912453,19178416,30231514,25569745,30024594,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {4744463,23721331,16702646,32948865,12895364,22674052,16757409,20149442,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {375025,13373615,21683106,25856361,10145849,32430429,18173282,29195816,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {477635,5781180,2818347,25938101,6926588,15571188,7564010,25071567,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {4551723,25691901,16242780,32913914,12083033,30201015,20164037,22465471,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {16520,20518430,1144707,7742973,5839683,22595129,24007036,26016915,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2837420,33325248,3494727,6897221,6570505,18599905,17580652,30119908,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {3394318,12719729,6032280,32034148,7138821,17836282,24312124,28060983,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {10904990,32860971,12667074,27679457,11026753,22450787,13725435,28015877,}},
{"0000000000000000000000000000000000000000000000000000000000000004", {1965928,32593671,11916112,33519589,4439696,5463225,8260156,14753995,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {925306,1295985,18161249,32824347,1050388,15089627,15126153,26162143,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {3633579,31983898,15584539,19766186,18004057,18332900,24205383,24465867,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2356723,23976633,4552275,6385134,8493810,28633235,19298870,21378879,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1959888,22654557,6474281,31748858,20082622,26550078,20264918,29712997,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {307453,19358543,29430800,31870134,9498175,17039188,25984927,29708092,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {579973,9373426,2663866,7349169,3818387,33229858,4093608,16461562,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1620139,9122166,5774863,11680063,6050524,13301932,7941532,33366261,}},
{"0000000000000000000000000000000000000000000000000000000000000004", {519956,31587388,1651632,14676460,9920521,30259574,21192494,29159346,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {7639147,30849510,15967391,29514312,12592973,25873044,16751871,24621393,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {4321511,7231584,6964789,32516491,16551292,23311962,22749791,29688020,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {6371448,21534533,10676677,18512603,7200641,8736955,9059969,22412246,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {6479146,17442330,15064799,31757229,9917575,26919893,16249039,20185364,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1898548,8102870,27331469,28266576,7601708,15005984,9970478,23179881,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {8824523,32302979,30904324,32883737,12333733,25963100,15288867,18989669,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1548541,8843756,2755641,14485937,10070222,27300259,20569030,28831372,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {3933582,32923759,22684416,32681323,5983801,32151279,8763644,20634443,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {5012656,10994861,16721985,30567353,19610350,32717977,25045228,33417764,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {17258015,27707751,26673969,32480251,21175481,31123996,30480722,33028625,}},
{"0000000000000000000000000000000000000000000000000000000000000004", {5903910,8655518,19731306,23870715,15498576,21520194,15566239,31655607,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1204528,11142967,3310310,10014673,8880746,12561187,23675817,33378929,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {76104,12682060,14628085,18171436,14981455,32744303,17056582,18770149,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {2696375,4820503,8559793,21524210,13599169,29147336,28403933,30552155,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1174385,5666437,8157877,12552667,8302517,8738371,12538730,14947174,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {615337,15689090,8431406,23563079,6899168,8800496,12950570,20173266,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1953266,11536716,18339238,29081823,5136210,13720741,19552516,24200164,}},
{"0000000000000000000000000000000000000000000000000000000000000004", {249398,16908574,18360411,30321347,2390792,33342214,5345732,23209599,}},
{"0000000000000000000000000000000000000000000000000000000000000003", {337570,15096899,950807,9258726,14597770,25482699,16338583,21823483,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {439297,19958741,10707482,23185296,5505982,5512387,26746726,28747056,}},
{"0000000000000000000000000000000000000000000000000000000000000003", {382428,20378022,13423578,16438183,8831736,23287565,16349318,22761138,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {997517,13645346,2278610,33102250,9532429,19721796,21163422,28204119,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {5539635,26357897,12410847,21826029,11144620,23084561,18700879,25928799,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2158337,25994688,10504737,30160761,12116158,28319046,12235990,14189630,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1436210,31626744,15898926,20060413,3036399,17054628,6259703,9455811,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {7978656,27534531,12406026,30227378,14747144,18286885,21527525,33038333,}},
{"0000000000000000000000000000000000000000000000000000000000000003", {252422,32197010,21490073,23059780,5455184,25487537,16068719,30014680,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1162839,2194236,29066916,32347888,9164579,29704919,14776042,32786384,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {5926523,26336777,6272293,25047609,8808382,9580150,11741921,32548287,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {485965,10980467,21070152,24146560,6060474,21603491,18854703,26569070,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {5530360,15850286,8323625,24337660,12505543,32524436,24896234,29424945,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {73124,19669640,6186952,11855781,17300508,26211536,19261491,25608557,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {6507045,12369767,9034123,25118377,11405198,13455953,27424266,28503839,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {3152039,15920508,18081625,25689141,10744827,32688393,11420166,27045339,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1784239,7595315,30353799,30614116,6328014,30966331,7151736,30452480,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2694538,6650304,26983645,30240551,7990737,18246058,13819126,21461656,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2733076,15474778,6251503,23420762,8640670,26180816,10178088,22017673,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {892285,1051258,1261253,29955713,3813881,25282973,16060177,22704686,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1444629,26910303,6845637,20552767,5303179,13136113,8363446,21013103,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {468002,8189424,4614596,7656344,2759493,32914589,9492978,18142254,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {3149773,20501373,13670277,32300221,5578821,27968301,7902924,22937692,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {4566477,22298090,5063792,18054718,5886835,22352284,8371750,22101911,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {8806142,14126367,9902594,24861914,9883421,15488143,10909056,21467314,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {3641746,4933661,14061855,18305499,4640168,11305894,9099587,21233653,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {799647,20796158,25579956,31946189,5316587,13163048,9711550,32526709,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {1617653,27387537,28302718,33467915,6866140,19438600,21030899,26326740,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {8367176,12545169,8753130,15613328,11092478,33348288,17044467,30094385,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {6129285,8031962,16253119,16310122,23466613,25508437,27298247,31637071,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {33751,8455478,6478798,15300822,827208,4668740,4275780,6329486,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2569453,10000831,13754977,24337529,7096075,15897346,12488993,25354052,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1441927,29262792,6103777,23944999,9057967,25431237,19255170,30025327,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2349913,16463865,7688257,16505662,12686274,33250102,13899111,30839779,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {375902,22372207,15774817,16851615,19041805,24064402,24981401,25058103,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2282249,26812627,15212454,30604719,6421525,23219112,16909589,17575431,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2509256,22030655,27417447,29733625,3775718,18058391,13755781,26668823,}},
{"0000000000000000000000000000000000000000000000000000000000000004", {41327,27884303,8982554,15544395,1568960,27710196,6097908,11227268,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {427709,33168785,2173145,18463592,2859857,24461152,7706421,18780110,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2402883,4658669,16394321,19995911,9740181,28122698,14738781,30007925,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {359036,15835276,5213590,21161333,5620942,27395400,7805499,20799224,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1160068,23793408,5976768,29689631,15056387,32641235,19689023,23880772,}},
{"0000000000000000000000000000000000000000000000000000000000000003", {2734848,12177394,10302727,22658732,11425715,14641710,14711261,16523355,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {451341,10100671,21021666,27991878,5195582,5618314,5692846,10679709,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2964617,15229319,4076115,19204520,3648554,32697910,20197289,27636639,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {440072,30938322,27084206,30246143,3123795,8858970,16606542,32801246,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {9053804,29580504,11412391,28577156,13177965,13558034,16467244,17597272,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {3193671,25950281,14992426,29625315,7956969,8211246,15166507,27057711,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {334505,22052844,28756749,32918800,1843853,5749604,9399097,21031785,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {4993887,11626466,6241557,24278440,11502165,19940637,26408954,29869824,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2407185,3852170,9504479,21953774,10050325,18652017,13951270,24166394,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {5420408,6981585,23870568,25089965,15225571,28209783,15340447,24744678,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {1220752,5013344,19880580,29007540,4727548,32095982,5112086,16690708,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {8801517,28319229,11703943,14978087,16018730,16974587,23680776,25500260,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {116915,4812536,22036751,26372345,9620689,28535061,18749446,30769373,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {9814620,21390460,13072117,20767487,16932327,25313517,22832642,28148883,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {266314,838840,10202997,19159789,1488135,23070617,13686162,28880632,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {997789,25683952,23305604,27802671,8083925,11297332,11840318,23127675,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {804277,24368209,4696656,12413559,3664586,8298028,14691095,19302385,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {4959792,7181349,11955606,30560922,11411750,12886320,15847408,30714873,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {676011,25074945,23692872,29269897,7294878,26983497,14954385,21473375,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {226406,10830525,10055779,10085800,1901739,3810417,14938451,31256809,}},
{"0000000000000000000000000000000000000000000000000000000000000005", {2995662,32503013,5787679,31858788,9325074,11503306,24879764,28676965,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {8671195,15011818,9378392,11477125,16056563,16400345,17535521,21619280,}},
{"0000000000000000000000000000000000000000000000000000000000000000", {2157875,27445165,5155391,30292735,9779645,11488081,20809173,22263281,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {11306513,18468576,30532327,30569445,12343544,20534469,24909512,25840040,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {2018384,14152248,10610344,16134504,10307466,28988177,18649688,29919281,}},
{"0000000000000000000000000000000000000000000000000000000000000002", {3214055,23884942,10169222,14881676,8001971,22015673,22681053,23535540,}},
{"0000000000000000000000000000000000000000000000000000000000000001", {9693164,28139918,15652061,23476135,10114742,31569401,17135058,32756480,}},
{"0000000000000000000000000000000000000000000000000000000000000005", {1276832,26649952,2610435,13194365,1439903,7796192,15145485,28696054,}},
};
// NOTE: These tests rely on CreateNewBlock doing its own self-validation!
@ -157,12 +157,10 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
BOOST_CHECK(pblocktemplate = CreateNewBlock(scriptPubKey));
CBlock *pblock = &pblocktemplate->block; // pointer for convenience
pblock->nVersion = 1;
pblock->nVersion = 4;
pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1;
CMutableTransaction txCoinbase(pblock->vtx[0]);
txCoinbase.vin[0].scriptSig = CScript();
txCoinbase.vin[0].scriptSig.push_back((unsigned char) 0);
txCoinbase.vin[0].scriptSig.push_back(chainActive.Height());
txCoinbase.vin[0].scriptSig = CScript() << (chainActive.Height()+1) << OP_0;
txCoinbase.vout[0].scriptPubKey = CScript();
pblock->vtx[0] = CTransaction(txCoinbase);
if (txFirst.size() < 2)