Implement a hard fork for extended/infinite claim expiration times #112

Closed
lbrynaut wants to merge 247 commits from claim-expiration into master
8 changed files with 76 additions and 75 deletions
Showing only changes of commit f2ebd4bcd4 - Show all commits

View file

@ -111,8 +111,8 @@ public:
consensus.nMajorityRejectBlockOutdated = 950; consensus.nMajorityRejectBlockOutdated = 950;
consensus.nMajorityWindow = 1000; consensus.nMajorityWindow = 1000;
consensus.powLimit = uint256S("0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.powLimit = uint256S("0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 30 * 60 * 12;//14 * 24 * 60 * 60; // two weeks consensus.nPowTargetTimespan = 150 * 24 * 2; // 2 hours
consensus.nPowTargetSpacing = 30; consensus.nPowTargetSpacing = 150;
consensus.fPowAllowMinDifficultyBlocks = false; consensus.fPowAllowMinDifficultyBlocks = false;
consensus.fPowNoRetargeting = false; consensus.fPowNoRetargeting = false;
/** /**

View file

@ -38,44 +38,44 @@ struct TestVector {
TestVector test1 = TestVector test1 =
TestVector("000102030405060708090a0b0c0d0e0f") TestVector("000102030405060708090a0b0c0d0e0f")
("xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8", ("Lpub2hkYkGHXktBhLCamCogeqGV7fQatCHyAe3LstjaUdvp6syZNaSGjdxf68TZG1hmc4Dz1dnMnZad1HHiS3DopTy4QxrMcSbiGir5nXrU2xFd",
"xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi", "LprvXPsFZUGgrX1X8fNGTeYQawgXAMnj4SeUu4SpYk4vfQ5MtF16HTUVzFEmFmfM4D4JQ66TyH2y3X1SAkMtYvV455cRn2EPLb1DyK21SWCtZac",
0x80000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j4WggLyQjgPie1rFSruoUihUZREPSL39UNdE3BBDu76", "LprvXasE7cg6LxvAahbgT4V6cvsjem4kABa16G45rgRdGcPPy92GpSDMS5fKKJc2QfFJjtJC997hgrcuj1ZQeN2V5krdT2H8UEJLPhjyHjdGM3u",
0); 0);
TestVector test2 = TestVector test2 =
TestVector("fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542") TestVector("fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542")
("xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB", ("Lpub2hkYkGHXktBhKp66JxkwHUCsubjJsvDzKd8cBgKJcJvyAxaZkb3g4rpgUZeEix8ZxnDoYT1wxf8G15SfAQiybt4MpnZ5H6Cw3DktojFA2uq",
"xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U", "LprvXPsFZUGgrX1X8GsbZoch39QHQYw9k4uJaeEYqgokdnCEBE2HTcFSR9QMbqSQEicPe8qtiZVRKd3dGH5zbLskgSwCESJdUvuxYZeEoQkoij6",
0) 0)
("xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH", ("Lpub2m2J1yyVEu1mr5gPSk8pMGcQGZUZatiGsnsyMVLkginvrw2YKrPkDhPw42c8X391B6hyQg1hMjyEAEsM3ZRPwUie6qHkBSMKAhsZEyWPpRJ",
"xprv9vHkqa6EV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YXfx9adVPodkPQFymK8tBBDLe5NjEjvtWKCTMSo7UqV2nLwZK4Qns6Jan",
0xFFFFFFFE) 0xFFFFFFFE)
("xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL", ("Lpub2rAMbZvJPqSnQWoJfL6aA4vNua3LHYRjK6BFefcGV7B1SQT6LvGmrBw18sAtG1xqWEjhhf2FLh2WZMA6RFSyeKLdW6S9K18wq5tgsCMpiS8",
"xprvA1RpRA33e1JQ7ifknakTFpgNXPmW2YvmhqLQYMmrj4xJXXWYpDPS3xz7iAxn8L39njGVyuoseXzU6rcxFLJ8HFsTjSyQbLYnMpCqE2VbFWc", "LprvXYH4QmuTVUGcCyaovAxKuk7nQXFB9h73a7HCJg6iWaSGSftp3wUYCUWgGC8CGAmgoZ41ShxAbiDfBrL7SqQotJ2cd429dEoyH9KaUbZHRAn",
2) 2)
("xpub6FnCn6nSzZAw5Tw7cgR9bi15UV96gLZhjDstkXXxvCLsUXBGXPdSnLFbdpq8p9HmGsApME5hQTZ3emM2rnY5agb9rXpVGyy3bdW6EEgAtqt", ("Lpub2sXPZ18ov1m29mzCPQEG8pJMJdaSXsLoyFo94Sxm7u2bWbnfWZCY2kt1DGFAPbKY2HwvyaXfEQ3W3nDbFM8sxaCD9GGEFNRgWP5sXmFVSUv",
"xprvA2nrNbFZABcdryreWet9Ea4LvTJcGsqrMzxHx98MMrotbir7yrKCEXw7nadnHM8Dq38EGfSh6dqA9QWTyefMLEcBYJUuekgW4BYPJcr9E7j", "LprvXZe6ND7y1eaqxEmheF61tVVkoanHQ228EGu5iTTD9NHrWsEPDaQJP3TgLboCRBrkqrujjTaz3p4MEQDdB9n2wGmLRuXegewgyWf8ZANdd3A",
0); 0);
void RunTest(const TestVector &test) { void RunTest(const TestVector &test) {

View file

@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)
BOOST_AUTO_TEST_CASE(bloom_create_insert_key) BOOST_AUTO_TEST_CASE(bloom_create_insert_key)
{ {
string strSecret = string("5Kg1gnAjaLfKiwhhPpGS3QfRg2m6awQvaj98JCZBZQ5SuS2F15C"); string strSecret = string("y2Kag6A9fz5PRsuA5vKT5gd1XqxJRxvn6eKXGdovHkbCBsiKmW");
CBitcoinSecret vchSecret; CBitcoinSecret vchSecret;
BOOST_CHECK(vchSecret.SetString(strSecret)); BOOST_CHECK(vchSecret.SetString(strSecret));
@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_key)
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
filter.Serialize(stream, SER_NETWORK, PROTOCOL_VERSION); filter.Serialize(stream, SER_NETWORK, PROTOCOL_VERSION);
vector<unsigned char> vch = ParseHex("038fc16b080000000000000001"); vector<unsigned char> vch = ParseHex("031ee0a1080000000000000001");
vector<char> expected(vch.size()); vector<char> expected(vch.size());
for (unsigned int i = 0; i < vch.size(); i++) for (unsigned int i = 0; i < vch.size(); i++)

View file

@ -1,6 +1,6 @@
[ [
[ [
"1AGNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62i", "bMzeGER3krZ2zX75uxLoLDA5tLvUX9w4QP",
"65a16059864a2fdbc7c99a4723a8395bc6f188eb", "65a16059864a2fdbc7c99a4723a8395bc6f188eb",
{ {
"addrType": "pubkey", "addrType": "pubkey",
@ -9,7 +9,7 @@
} }
], ],
[ [
"3CMNFxN1oHBc4R1EpboAL5yzHGgE611Xou", "rGtwTfEisPQ7k8KNggmT4kq2vHpbEV6evU",
"74f209f6ea907e2ea48f74fae05782ae8a665257", "74f209f6ea907e2ea48f74fae05782ae8a665257",
{ {
"addrType": "script", "addrType": "script",
@ -36,7 +36,7 @@
} }
], ],
[ [
"5Kd3NBUAdUnhyzenEwVLy9pBKxSwXvE9FMPyR4UKZvpe6E3AgLr", "yEbizayQwA4VxYFayRRb5rjkYs8XVxaZSKD25ggAQ9rk8onJSj",
"eddbdc1168f1daeadbd3e44c1e3f8f5a284c2029f78ad26af98583a499de5b19", "eddbdc1168f1daeadbd3e44c1e3f8f5a284c2029f78ad26af98583a499de5b19",
{ {
"isCompressed": false, "isCompressed": false,
@ -45,7 +45,7 @@
} }
], ],
[ [
"Kz6UJmQACJmLtaQj5A3JAge4kVTNQ8gbvXuwbmCj7bsaabudb3RD", "5C7R8dNCgw9bSq5umaZzZHBMs3N8vHZueMcueLZG1kWQRW1Mz8v6",
"55c9bccb9ed68446d1b75273bbce89d7fe013a8acd1625514420fb2aca1a21c4", "55c9bccb9ed68446d1b75273bbce89d7fe013a8acd1625514420fb2aca1a21c4",
{ {
"isCompressed": true, "isCompressed": true,
@ -72,7 +72,7 @@
} }
], ],
[ [
"1Ax4gZtb7gAit2TivwejZHYtNNLT18PUXJ", "bNgLNoE5U1ZCPsK61bxpmwgksFEdSLDin3",
"6d23156cbbdcc82a5a47eee4c2c7c583c18b6bf4", "6d23156cbbdcc82a5a47eee4c2c7c583c18b6bf4",
{ {
"addrType": "pubkey", "addrType": "pubkey",
@ -81,7 +81,7 @@
} }
], ],
[ [
"3QjYXhTkvuj8qPaXHTTWb5wjXhdsLAAWVy", "rVH7jQLU11weX6tf9YRoKknnAinEWYU5ev",
"fcc5460dd6e2487c7d75b1963625da0e8f4c5975", "fcc5460dd6e2487c7d75b1963625da0e8f4c5975",
{ {
"addrType": "script", "addrType": "script",
@ -108,7 +108,7 @@
} }
], ],
[ [
"5K494XZwps2bGyeL71pWid4noiSNA2cfCibrvRWqcHSptoFn7rc", "xfhRLgkcKPwnwXoT3kbLZ7MEJrZ9cM6WoX6XSjCCkn3YhuSnEY",
"a326b95ebae30164217d7a7f57d72ab2b54e3be64928a19da0210b9568d4015e", "a326b95ebae30164217d7a7f57d72ab2b54e3be64928a19da0210b9568d4015e",
{ {
"isCompressed": false, "isCompressed": false,
@ -117,7 +117,7 @@
} }
], ],
[ [
"L1RrrnXkcKut5DEMwtDthjwRcTTwED36thyL1DebVrKuwvohjMNi", "5DSogeVo6xJ8dTuYeJkb6LUij1NhkMvQcXgJ3o18PzxjnpvtS5sN",
"7d998b45c219a1e38e99e7cbd312ef67f77a455a9b50c730c27f02c6f730dfb4", "7d998b45c219a1e38e99e7cbd312ef67f77a455a9b50c730c27f02c6f730dfb4",
{ {
"isCompressed": true, "isCompressed": true,
@ -144,7 +144,7 @@
} }
], ],
[ [
"1C5bSj1iEGUgSTbziymG7Cn18ENQuT36vv", "bPos8xMCabs9xJTMoe5MKrusd7GbNLFpt7",
"7987ccaa53d02c8873487ef919677cd3db7a6912", "7987ccaa53d02c8873487ef919677cd3db7a6912",
{ {
"addrType": "pubkey", "addrType": "pubkey",
@ -153,7 +153,7 @@
} }
], ],
[ [
"3AnNxabYGoTxYiTEZwFEnerUoeFXK2Zoks", "rFKxAHUFLugUERmNS2DXXKhXSfPtXqN8b6",
"63bcc565f9e68ee0189dd5cc67f1b0e5f02f45cb", "63bcc565f9e68ee0189dd5cc67f1b0e5f02f45cb",
{ {
"addrType": "script", "addrType": "script",
@ -180,7 +180,7 @@
} }
], ],
[ [
"5KaBW9vNtWNhc3ZEDyNCiXLPdVPHCikRxSBWwV9NrpLLa4LsXi9", "yBjry3Bfxk481Sha1JHLTNx45oUCJUsGX6kYWMjTHfZDwJMQAY",
"e75d936d56377f432f404aabb406601f892fd49da90eb6ac558a733c93b47252", "e75d936d56377f432f404aabb406601f892fd49da90eb6ac558a733c93b47252",
{ {
"isCompressed": false, "isCompressed": false,
@ -189,7 +189,7 @@
} }
], ],
[ [
"L1axzbSyynNYA8mCAhzxkipKkfHtAXYF4YQnhSKcLV8YXA874fgT", "5DbupTR2UQkniPSNs8Xf9KMcsDCeggRYnN7kk1g9EdmNN4JEp3zv",
"8248bd0375f2f75d7e274ae544fb920f51784480866b102384190b1addfbaa5c", "8248bd0375f2f75d7e274ae544fb920f51784480866b102384190b1addfbaa5c",
{ {
"isCompressed": true, "isCompressed": true,
@ -216,7 +216,7 @@
} }
], ],
[ [
"1Gqk4Tv79P91Cc1STQtU3s1W6277M2CVWu", "bUa1khFbViXUiSroY5CZGX9Nau1HktvTNW",
"adc1cc2081a27206fae25792f28bbc55b831549d", "adc1cc2081a27206fae25792f28bbc55b831549d",
{ {
"addrType": "pubkey", "addrType": "pubkey",
@ -225,7 +225,7 @@
} }
], ],
[ [
"33vt8ViH5jsr115AGkW6cEmEz9MpvJSwDk", "r8UTLCaz9r6MgiPJ8qUPLucHdAWC7EDDBJ",
"188f91a931947eddd7432d6e614387e32b244709", "188f91a931947eddd7432d6e614387e32b244709",
{ {
"addrType": "script", "addrType": "script",
@ -252,7 +252,7 @@
} }
], ],
[ [
"5HtH6GdcwCJA4ggWEL1B3jzBBUB8HPiBi9SBc5h9i4Wk4PSeApR", "wVqT5kRiefWaeZyaMwFfg2jc4bKGySd2EMRD6uWJXqxi96CuDZ",
"091035445ef105fa1bb125eccfb1882f3fe69592265956ade751fd095033d8d0", "091035445ef105fa1bb125eccfb1882f3fe69592265956ade751fd095033d8d0",
{ {
"isCompressed": false, "isCompressed": false,
@ -261,7 +261,7 @@
} }
], ],
[ [
"L2xSYmMeVo3Zek3ZTsv9xUrXVAmrWxJ8Ua4cw8pkfbQhcEFhkXT8", "5EyPNdKgzRRpCzikAJSrM5Ppbigd37BSCPmayiBHZk3XT8RsfbhV",
"ab2b4bcdfc91d34dee0ae2a8c6b6668dadaeb3a88b9859743156f462325187af", "ab2b4bcdfc91d34dee0ae2a8c6b6668dadaeb3a88b9859743156f462325187af",
{ {
"isCompressed": true, "isCompressed": true,
@ -288,7 +288,7 @@
} }
], ],
[ [
"1JwMWBVLtiqtscbaRHai4pqHokhFCbtoB4", "bWfdCQpqF4ENPTSwVwtoHUyAJdbRcvo1w1",
"c4c1b72491ede1eedaca00618407ee0b772cad0d", "c4c1b72491ede1eedaca00618407ee0b772cad0d",
{ {
"addrType": "pubkey", "addrType": "pubkey",
@ -297,7 +297,7 @@
} }
], ],
[ [
"3QCzvfL4ZRvmJFiWWBVwxfdaNBT8EtxB5y", "rUka8NCmdY9Gyy2eNGUEhLUd1CbVSzFEqA",
"f6fe69bcb548a829cce4c57bf6fff8af3a5981f9", "f6fe69bcb548a829cce4c57bf6fff8af3a5981f9",
{ {
"addrType": "script", "addrType": "script",
@ -324,7 +324,7 @@
} }
], ],
[ [
"5KQmDryMNDcisTzRp3zEq9e4awRmJrEVU1j5vFRTKpRNYPqYrMg", "y2Kag6A9fz5PRsuA5vKT5gd1XqxJRxvn6eKXGdovHkbCBsiKmW",
"d1fab7ab7385ad26872237f1eb9789aa25cc986bacc695e07ac571d6cdac8bc0", "d1fab7ab7385ad26872237f1eb9789aa25cc986bacc695e07ac571d6cdac8bc0",
{ {
"isCompressed": false, "isCompressed": false,
@ -333,7 +333,7 @@
} }
], ],
[ [
"L39Fy7AC2Hhj95gh3Yb2AU5YHh1mQSAHgpNixvm27poizcJyLtUi", "5FACny8EWv5yhLMsjy7iZ4cqQEvXvb3bQe5h1W7Z1ySYqWKWLfxV",
"b0bbede33ef254e8376aceb1510253fc3550efd0fcf84dcd0c9998b288f166b3", "b0bbede33ef254e8376aceb1510253fc3550efd0fcf84dcd0c9998b288f166b3",
{ {
"isCompressed": true, "isCompressed": true,
@ -360,7 +360,7 @@
} }
], ],
[ [
"19dcawoKcZdQz365WpXWMhX6QCUpR9SY4r", "bMMtHB8oxu1tVswSbUqbaMexu5Nzkzo7s4",
"5eadaf9bb7121f0f192561a5a62f5e5f54210292", "5eadaf9bb7121f0f192561a5a62f5e5f54210292",
{ {
"addrType": "pubkey", "addrType": "pubkey",
@ -369,7 +369,7 @@
} }
], ],
[ [
"37Sp6Rv3y4kVd1nQ1JV5pfqXccHNyZm1x3", "rBzPJ8nm3Ay1Jj6XsPTNZLgaFdRkFcYQhW",
"3f210e7277c899c3a155cc1c90f4106cbddeec6e", "3f210e7277c899c3a155cc1c90f4106cbddeec6e",
{ {
"addrType": "script", "addrType": "script",
@ -396,7 +396,7 @@
} }
], ],
[ [
"5KL6zEaMtPRXZKo1bbMq7JDjjo1bJuQcsgL33je3oY8uSJCR5b4", "xwfM3hAfqnt5HgUwdHujEGJAPRnJV94BmFGekrQQ1U869kQ814",
"c7666842503db6dc6ea061f092cfb9c388448629a6fe868d068c42a488b478ae", "c7666842503db6dc6ea061f092cfb9c388448629a6fe868d068c42a488b478ae",
{ {
"isCompressed": false, "isCompressed": false,
@ -405,7 +405,7 @@
} }
], ],
[ [
"KwV9KAfwbwt51veZWNscRTeZs9CKpojyu1MsPnaKTF5kz69H1UN2", "59W692dz6aGKaBKkCoQJp4Bryh76LxdHcq4qSMvrMPiapzHJ8xU3",
"07f0803fc5399e773555ab1e8939907e9badacc17ca129e67a2f5f2ff84351dd", "07f0803fc5399e773555ab1e8939907e9badacc17ca129e67a2f5f2ff84351dd",
{ {
"isCompressed": true, "isCompressed": true,
@ -432,7 +432,7 @@
} }
], ],
[ [
"13p1ijLwsnrcuyqcTvJXkq2ASdXqcnEBLE", "bFYHQxgSE8F6RpgyYaccyVA2wWS24vAK55",
"1ed467017f043e91ed4c44b4e8dd674db211c4e6", "1ed467017f043e91ed4c44b4e8dd674db211c4e6",
{ {
"addrType": "pubkey", "addrType": "pubkey",
@ -441,7 +441,7 @@
} }
], ],
[ [
"3ALJH9Y951VCGcVZYAdpA3KchoP9McEj1G", "rEssUrQr97hhxKohQFc6tiAfLpXWTVyZcA",
"5ece0cadddc415b1980f001785947120acdb36fc", "5ece0cadddc415b1980f001785947120acdb36fc",
{ {
"addrType": "script", "addrType": "script",

View file

@ -18,14 +18,14 @@
using namespace std; using namespace std;
static const string strSecret1 ("5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmFiWtmAbrj"); static const string strSecret1 ("wa5HjniP9uB4WhuPvEqZ2iPaKeLiartbkozAkVeGEawAiGczAo");
static const string strSecret2 ("5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3"); static const string strSecret2 ("xod1Yy2XNNRYDAQj54B794GSxxo4uV6kSu9coVKbxbSc5KCa29");
static const string strSecret1C ("Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw"); static const string strSecret1C ("59ryvsrmenHHQW7YG9z5JNZge5Hp2YTCkQNPL2yRUExn5Nhw8bmC");
static const string strSecret2C ("L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g"); static const string strSecret2C ("5FJmwS6Hj3KZJkgXigu1c6ZRBc1GLEf2NmKB32C17JP21Rygv8MU");
static const CBitcoinAddress addr1 ("1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ"); static const CBitcoinAddress addr1 ("bbz7XaohRQwxZE9bPECfXs1HGcEdVP9ozp");
static const CBitcoinAddress addr2 ("1F5y5E5FMc5YzdJtB9hLaUe43GDxEKXENJ"); static const CBitcoinAddress addr2 ("bSpEmTQjhwU2WUAFFp1Ro8mvY988f37xR8");
static const CBitcoinAddress addr1C("1NoJrossxPBKfCHuJXT4HadJrXRE9Fxiqs"); static const CBitcoinAddress addr1C("baXaZ3DNJiZoB39GPBm9WEmBMQKQd42jZe");
static const CBitcoinAddress addr2C("1CRj2HyM1CXWzHAXLQtiGLyggNT9WQqsDs"); static const CBitcoinAddress addr2C("bQ9ziXJqMXuzW81tR5CoV17ZBFMKwLuYUd");
static const string strAddressBad("1HV9Lc3sNHZxwj4Zk6fB38tEmBryq2cBiF"); static const string strAddressBad("1HV9Lc3sNHZxwj4Zk6fB38tEmBryq2cBiF");

View file

@ -95,13 +95,13 @@ const unsigned int nonces[] = {
194459, 110761, 23732, 7293, 171766, 61663, 11548, 120419, 55377, 16735, 194459, 110761, 23732, 7293, 171766, 61663, 11548, 120419, 55377, 16735,
22878, 134905, 212010, 386284, 64559, 40003, 74327, 94247, 285391, 23496, 22878, 134905, 212010, 386284, 64559, 40003, 74327, 94247, 285391, 23496,
15196, 72827, 7657, 54628, 128507, 85977, 110355, 7423, 2783, 10412, 15196, 72827, 7657, 54628, 128507, 85977, 110355, 7423, 2783, 10412,
101705, 371190, 48999, 107613, 277276, 64945, 5153, 13299, 17459, 72684, 101705, 371190, 48999, 107613, 277276, 64945, 5153, 84763, 15821, 26367,
44823, 35441, 26420, 86802, 167748, 146648, 55512, 3028, 7617, 39578, 218930, 24372, 149133, 319882, 546029, 276981, 234459, 42544, 25492, 271478,
20422, 9399, 2315, 16152, 38659, 92561, 8113, 65207, 7377, 50940, 211922, 337435, 316666, 76817, 478054, 34093, 11356, 67492, 316269, 150493,
7990, 5850, 26984, 52164, 178476, 149852, 47843, 158113, 41067, 19083, 472164, 126274, 185348, 55992, 17084, 13907, 120452, 17353, 33428, 843,
1327, 59064, 31805, 255902, 183334, 45615, 93019, 57065, 12571, 12702, 4592, 242491, 55161, 22142, 120981, 318025, 70127, 41879, 138513, 98839,
139221, 5794, 33802, 1231, 23462, 6155, 7592, 25306, 112808, 1155, 55840, 475261, 176074, 114618, 195011, 890468, 760697, 46632, 740918, 481503,
12771, 48467, 7670, 17533, 56443, 37742, 13555, 18969, 13887, 9033, 259751, 282723, 1912906, 2630280, 1418854, 1477557, 1250567, 2533285, 2699754, 545072,
}; };
// NOTE: These tests rely on CreateNewBlock doing its own self-validation! // NOTE: These tests rely on CreateNewBlock doing its own self-validation!
@ -124,7 +124,9 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
std::vector<CTransaction*>txFirst; std::vector<CTransaction*>txFirst;
for (unsigned int i = 0; i < 110; ++i) for (unsigned int i = 0; i < 110; ++i)
{ {
BOOST_CHECK(pblocktemplate = CreateNewBlock(scriptPubKey));
CBlock *pblock = &pblocktemplate->block; // pointer for convenience CBlock *pblock = &pblocktemplate->block; // pointer for convenience
pblock->hashPrevBlock = chainActive.Tip()->GetBlockHash();
pblock->nVersion = 1; pblock->nVersion = 1;
pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1; pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1;
CMutableTransaction txCoinbase(pblock->vtx[0]); CMutableTransaction txCoinbase(pblock->vtx[0]);
@ -156,9 +158,8 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
CValidationState state; CValidationState state;
BOOST_CHECK(ProcessNewBlock(state, NULL, pblock, true, NULL)); BOOST_CHECK(ProcessNewBlock(state, NULL, pblock, true, NULL));
BOOST_CHECK(state.IsValid()); BOOST_CHECK(state.IsValid());
pblock->hashPrevBlock = pblock->GetHash();
}
delete pblocktemplate; delete pblocktemplate;
}
// Just to make sure we can still make simple blocks // Just to make sure we can still make simple blocks
BOOST_CHECK(pblocktemplate = CreateNewBlock(scriptPubKey)); BOOST_CHECK(pblocktemplate = CreateNewBlock(scriptPubKey));

View file

@ -100,10 +100,10 @@ BOOST_AUTO_TEST_CASE(rpc_rawsign)
"\"vout\":1,\"scriptPubKey\":\"a914b10c9df5f7edf436c697f02f1efdba4cf399615187\"," "\"vout\":1,\"scriptPubKey\":\"a914b10c9df5f7edf436c697f02f1efdba4cf399615187\","
"\"redeemScript\":\"512103debedc17b3df2badbcdd86d5feb4562b86fe182e5998abd8bcd4f122c6155b1b21027e940bb73ab8732bfdf7f9216ecefca5b94d6df834e77e108f68e66f126044c052ae\"}]"; "\"redeemScript\":\"512103debedc17b3df2badbcdd86d5feb4562b86fe182e5998abd8bcd4f122c6155b1b21027e940bb73ab8732bfdf7f9216ecefca5b94d6df834e77e108f68e66f126044c052ae\"}]";
r = CallRPC(string("createrawtransaction ")+prevout+" "+ r = CallRPC(string("createrawtransaction ")+prevout+" "+
"{\"3HqAe9LtNBjnsfM4CyYaWTnvCaUYT7v4oZ\":11}"); "{\"rNNjqrDbSHxJZNfC54WsF8dxqbcue9SoiB\":11}");
string notsigned = r.get_str(); string notsigned = r.get_str();
string privkey1 = "\"KzsXybp9jX64P5ekX1KUxRQ79Jht9uzW7LorgwE65i5rWACL6LQe\""; string privkey1 = "\"5CtUoTnCE9UJwLKwDRrBM1wQFrceg4soqAWpjWacyrigM4F9g3C3\"";
string privkey2 = "\"Kyhdf5LuKTRx4ge69ybABsiUAWjVRK4XGxAKk2FQLp2HjGMy87Z4\""; string privkey2 = "\"5BiaUwJwp5pCcwKGrQ7raUFmH4eFwTwpzmsHnbbwExf7aAToyHZB\"";
r = CallRPC(string("signrawtransaction ")+notsigned+" "+prevout+" "+"[]"); r = CallRPC(string("signrawtransaction ")+notsigned+" "+prevout+" "+"[]");
BOOST_CHECK(find_value(r.get_obj(), "complete").get_bool() == false); BOOST_CHECK(find_value(r.get_obj(), "complete").get_bool() == false);
r = CallRPC(string("signrawtransaction ")+notsigned+" "+prevout+" "+"["+privkey1+","+privkey2+"]"); r = CallRPC(string("signrawtransaction ")+notsigned+" "+prevout+" "+"["+privkey1+","+privkey2+"]");

View file

@ -204,7 +204,7 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
/* Illegal address */ /* Illegal address */
BOOST_CHECK_THROW(CallRPC("verifymessage 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X " + retValue.get_str() + " mymessage"), runtime_error); BOOST_CHECK_THROW(CallRPC("verifymessage 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X " + retValue.get_str() + " mymessage"), runtime_error);
/* wrong address */ /* wrong address */
BOOST_CHECK(CallRPC("verifymessage 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ " + retValue.get_str() + " mymessage").get_bool() == false); BOOST_CHECK(CallRPC("verifymessage bQjqYni8PdsGdQpyPtrVdNY31W49TL31kR " + retValue.get_str() + " mymessage").get_bool() == false);
/* Correct address and signature but wrong message */ /* Correct address and signature but wrong message */
BOOST_CHECK(CallRPC("verifymessage " + demoAddress.ToString() + " " + retValue.get_str() + " wrongmessage").get_bool() == false); BOOST_CHECK(CallRPC("verifymessage " + demoAddress.ToString() + " " + retValue.get_str() + " wrongmessage").get_bool() == false);
/* Correct address, message and signature*/ /* Correct address, message and signature*/