You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bitcoind-comparison.patch 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. diff --git a/contrib/test-patches/bitcoind-comparison.patch b/contrib/test-patches/bitcoind-comparison.patch
  2. index 04a8618..519429a 100644
  3. --- a/src/main.cpp
  4. +++ b/src/main.cpp
  5. @@ -31,8 +31,8 @@ CTxMemPool mempool;
  6. map<uint256, CBlockIndex*> mapBlockIndex;
  7. std::vector<CBlockIndex*> vBlockIndexByHeight;
  8. -uint256 hashGenesisBlock("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f");
  9. -static CBigNum bnProofOfWorkLimit(~uint256(0) >> 32);
  10. +uint256 hashGenesisBlock("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206");
  11. +static CBigNum bnProofOfWorkLimit(~uint256(0) >> 1);
  12. CBlockIndex* pindexGenesisBlock = NULL;
  13. int nBestHeight = -1;
  14. uint256 nBestChainWork = 0;
  15. @@ -1055,7 +1055,7 @@ int64 static GetBlockValue(int nHeight, int64 nFees)
  16. int64 nSubsidy = 50 * COIN;
  17. // Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
  18. - nSubsidy >>= (nHeight / 210000);
  19. + nSubsidy >>= (nHeight / 150);
  20. return nSubsidy + nFees;
  21. }
  22. @@ -2736,9 +2736,9 @@ bool InitBlockIndex() {
  23. block.hashPrevBlock = 0;
  24. block.hashMerkleRoot = block.BuildMerkleTree();
  25. block.nVersion = 1;
  26. - block.nTime = 1231006505;
  27. - block.nBits = 0x1d00ffff;
  28. - block.nNonce = 2083236893;
  29. + block.nTime = 1296688602;
  30. + block.nBits = 0x207fffff;
  31. + block.nNonce = 2;
  32. if (fTestNet)
  33. {
  34. @@ -3024,7 +3024,7 @@ bool static AlreadyHave(const CInv& inv)
  35. // The message start string is designed to be unlikely to occur in normal data.
  36. // The characters are rarely used upper ASCII, not valid as UTF-8, and produce
  37. // a large 4-byte int at any alignment.
  38. -unsigned char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 };
  39. +unsigned char pchMessageStart[4] = { 0xfa, 0xbf, 0xb5, 0xda };
  40. void static ProcessGetData(CNode* pfrom)
  41. diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
  42. index af28465..ee9a4db 100644
  43. --- a/src/test/miner_tests.cpp
  44. +++ b/src/test/miner_tests.cpp
  45. @@ -15,34 +15,117 @@ struct {
  46. unsigned char extranonce;
  47. unsigned int nonce;
  48. } blockinfo[] = {
  49. - {4, 0xa4a3e223}, {2, 0x15c32f9e}, {1, 0x0375b547}, {1, 0x7004a8a5},
  50. - {2, 0xce440296}, {2, 0x52cfe198}, {1, 0x77a72cd0}, {2, 0xbb5d6f84},
  51. - {2, 0x83f30c2c}, {1, 0x48a73d5b}, {1, 0xef7dcd01}, {2, 0x6809c6c4},
  52. - {2, 0x0883ab3c}, {1, 0x087bbbe2}, {2, 0x2104a814}, {2, 0xdffb6daa},
  53. - {1, 0xee8a0a08}, {2, 0xba4237c1}, {1, 0xa70349dc}, {1, 0x344722bb},
  54. - {3, 0xd6294733}, {2, 0xec9f5c94}, {2, 0xca2fbc28}, {1, 0x6ba4f406},
  55. - {2, 0x015d4532}, {1, 0x6e119b7c}, {2, 0x43e8f314}, {2, 0x27962f38},
  56. - {2, 0xb571b51b}, {2, 0xb36bee23}, {2, 0xd17924a8}, {2, 0x6bc212d9},
  57. - {1, 0x630d4948}, {2, 0x9a4c4ebb}, {2, 0x554be537}, {1, 0xd63ddfc7},
  58. - {2, 0xa10acc11}, {1, 0x759a8363}, {2, 0xfb73090d}, {1, 0xe82c6a34},
  59. - {1, 0xe33e92d7}, {3, 0x658ef5cb}, {2, 0xba32ff22}, {5, 0x0227a10c},
  60. - {1, 0xa9a70155}, {5, 0xd096d809}, {1, 0x37176174}, {1, 0x830b8d0f},
  61. - {1, 0xc6e3910e}, {2, 0x823f3ca8}, {1, 0x99850849}, {1, 0x7521fb81},
  62. - {1, 0xaacaabab}, {1, 0xd645a2eb}, {5, 0x7aea1781}, {5, 0x9d6e4b78},
  63. - {1, 0x4ce90fd8}, {1, 0xabdc832d}, {6, 0x4a34f32a}, {2, 0xf2524c1c},
  64. - {2, 0x1bbeb08a}, {1, 0xad47f480}, {1, 0x9f026aeb}, {1, 0x15a95049},
  65. - {2, 0xd1cb95b2}, {2, 0xf84bbda5}, {1, 0x0fa62cd1}, {1, 0xe05f9169},
  66. - {1, 0x78d194a9}, {5, 0x3e38147b}, {5, 0x737ba0d4}, {1, 0x63378e10},
  67. - {1, 0x6d5f91cf}, {2, 0x88612eb8}, {2, 0xe9639484}, {1, 0xb7fabc9d},
  68. - {2, 0x19b01592}, {1, 0x5a90dd31}, {2, 0x5bd7e028}, {2, 0x94d00323},
  69. - {1, 0xa9b9c01a}, {1, 0x3a40de61}, {1, 0x56e7eec7}, {5, 0x859f7ef6},
  70. - {1, 0xfd8e5630}, {1, 0x2b0c9f7f}, {1, 0xba700e26}, {1, 0x7170a408},
  71. - {1, 0x70de86a8}, {1, 0x74d64cd5}, {1, 0x49e738a1}, {2, 0x6910b602},
  72. - {0, 0x643c565f}, {1, 0x54264b3f}, {2, 0x97ea6396}, {2, 0x55174459},
  73. - {2, 0x03e8779a}, {1, 0x98f34d8f}, {1, 0xc07b2b07}, {1, 0xdfe29668},
  74. - {1, 0x3141c7c1}, {1, 0xb3b595f4}, {1, 0x735abf08}, {5, 0x623bfbce},
  75. - {2, 0xd351e722}, {1, 0xf4ca48c9}, {1, 0x5b19c670}, {1, 0xa164bf0e},
  76. - {2, 0xbbbeb305}, {2, 0xfe1c810a},
  77. +{4, 2762203683},
  78. +{2, 365113248},
  79. +{1, 58045772},
  80. +{1, 1879353512},
  81. +{2, 3460563607},
  82. +{2, 1389355416},
  83. +{1, 2007444690},
  84. +{2, 3143462790},
  85. +{2, 2213743660},
  86. +{1, 1218919771},
  87. +{1, 4017999107},
  88. +{2, 1745471173},
  89. +{2, 142846780},
  90. +{1, 142326754},
  91. +{2, 553953301},
  92. +{2, 3757796778},
  93. +{1, 4002023946},
  94. +{2, 3124901826},
  95. +{1, 2802010589},
  96. +{1, 877077181},
  97. +{3, 3593029427},
  98. +{2, 3969866902},
  99. +{2, 3392125996},
  100. +{1, 1805972490},
  101. +{2, 22889779},
  102. +{1, 1846647676},
  103. +{2, 1139340052},
  104. +{2, 664153912},
  105. +{2, 3044128027},
  106. +{2, 3010194979},
  107. +{2, 3514377385},
  108. +{2, 1807880922},
  109. +{1, 1661815113},
  110. +{2, 2588692156},
  111. +{2, 1431037239},
  112. +{1, 3594379210},
  113. +{2, 2701839377},
  114. +{1, 1973060452},
  115. +{2, 4218620174},
  116. +{1, 3895224884},
  117. +{1, 3812528857},
  118. +{3, 1703867851},
  119. +{2, 3123904294},
  120. +{5, 36151564},
  121. +{1, 2846294357},
  122. +{5, 3499546633},
  123. +{1, 924279160},
  124. +{1, 2198572304},
  125. +{1, 3336802574},
  126. +{2, 2185182379},
  127. +{1, 2575632458},
  128. +{1, 1965161345},
  129. +{1, 2865408940},
  130. +{1, 3594887915},
  131. +{5, 2062161796},
  132. +{5, 2641251194},
  133. +{1, 1290342362},
  134. +{1, 2883355438},
  135. +{6, 1244984107},
  136. +{2, 4065479712},
  137. +{2, 465481866},
  138. +{1, 2907174016},
  139. +{1, 2667735788},
  140. +{1, 363417673},
  141. +{2, 3519780275},
  142. +{2, 4165713317},
  143. +{1, 262548689},
  144. +{1, 3764359529},
  145. +{1, 2027001003},
  146. +{5, 1043862655},
  147. +{5, 1937481940},
  148. +{1, 1664585233},
  149. +{1, 1834979792},
  150. +{2, 2288070330},
  151. +{2, 3915617412},
  152. +{1, 3086662813},
  153. +{2, 430970259},
  154. +{1, 1519443249},
  155. +{2, 1540874280},
  156. +{2, 2496660261},
  157. +{1, 2847522842},
  158. +{1, 977329763},
  159. +{1, 1458040519},
  160. +{5, 2241822454},
  161. +{1, 4253963824},
  162. +{1, 722247551},
  163. +{1, 3127905834},
  164. +{1, 1903207432},
  165. +{1, 1893631657},
  166. +{1, 1960201429},
  167. +{1, 1239890082},
  168. +{2, 1762702850},
  169. +{0, 1681675873},
  170. +{1, 1411795775},
  171. +{2, 2548720534},
  172. +{2, 1427588186},
  173. +{2, 65566621},
  174. +{1, 2566081936},
  175. +{1, 3229297415},
  176. +{1, 3756168812},
  177. +{1, 826394561},
  178. +{1, 3015022068},
  179. +{1, 1935326986},
  180. +{5, 1648098256},
  181. +{2, 3545360164},
  182. +{1, 4106897609},
  183. +{1, 1528415857},
  184. +{1, 2707734286},
  185. +{2, 3149837061},
  186. +{2, 4263280906},
  187. +
  188. };
  189. // NOTE: These tests rely on CreateNewBlock doing its own self-validation!