Skip to content
Permalink
Browse files

Autotest: Add tests for mainnet jobs, duplicate and low difficulty sh…

…ares
  • Loading branch information...
SwimmingTiger committed Jun 27, 2019
1 parent 8a007ae commit f2476ae21d74a53117a7cb6eb53636a7598535f8
@@ -23,7 +23,7 @@
$requestNum = 2;
$responseNum = 0;
for ($readLines=0; $readLines<100; $readLines++) {
for ($readLines=0; $readLines<120; $readLines++) {
$line = fgets($fp);
$line = trim($line);
$data = json_decode($line, true);
@@ -50,7 +50,7 @@
}
writeToServer($fp, $jsonLines);
$shareNum = count($testData['submit'][$hash]);
echo "[INFO] Submit ", $shareNum, " to server\n";
echo "[INFO] Submit ", $shareNum, " shares to server\n";
$requestNum += $shareNum;
unset($testData['submit'][$hash]);
}
@@ -70,6 +70,7 @@
$responseNum++;
if (empty($testData['submit']) && ($requestNum == $responseNum)) {
echo "[INFO] Read $readLines lines from server\n";
break;
}
}
@@ -26,7 +26,7 @@ outputTestData() {
line=${line/@TIME@/$(date +%s)}
echo $line
echo send new job at $(date) >&2
sleep 10
sleep 5
done
}

@@ -26,7 +26,7 @@ outputTestData() {
line=${line/@TIME@/$(date +%s)}
echo $line
echo send new job at $(date) >&2
sleep 10
sleep 5
done
}

@@ -19,3 +19,5 @@
{"jobId":17680795489418423297,"gbtHash":"98da473b3b03010f209b7fc8c85c7787c6412aaafc0032a586fb8a0eebd12c43","prevHash":"5d11640011603cac4d4ad9bdf8dbb7cd15c9db9d4ec6b87f0bd369a590c3cee5","prevHashBeStr":"90c3cee50bd369a54ec6b87f15c9db9df8dbb7cd4d4ad9bd11603cac5d116400","height":6,"coinbase1":"02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2a560419f4b65c726567696f6e312f50726f6a65637420425443506f6f6c2f","coinbase2":"ffffffff0200f2052a010000001976a914c0174e89bd93eacd1d5a1af4ba1802d412afc08688ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000","merkleBranch":"","nVersion":536870912,"nBits":545259519,"nTime":1555489221,"minTime":1555489211,"coinbaseValue":5000000000,"witnessCommitment":"6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9","nmcBlockHash":"0000000000000000000000000000000000000000000000000000000000000000","nmcBits":0,"nmcHeight":0,"nmcRpcAddr":"","nmcRpcUserpass":"","rskBlockHashForMergedMining":"","rskNetworkTarget":"0x0000000000000000000000000000000000000000000000000000000000000000","rskFeesForMiner":"","rskdRpcAddress":"","rskdRpcUserPwd":"","isRskCleanJob":false,"mergedMiningClean":false}
{"jobId":17680795502303325185,"gbtHash":"98da473b3b03010f209b7fc8c85c7787c6412aaafc0032a586fb8a0eebd12c43","prevHash":"5d11640011603cac4d4ad9bdf8dbb7cd15c9db9d4ec6b87f0bd369a590c3cee5","prevHashBeStr":"90c3cee50bd369a54ec6b87f15c9db9df8dbb7cd4d4ad9bd11603cac5d116400","height":6,"coinbase1":"02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2a56041cf4b65c726567696f6e312f50726f6a65637420425443506f6f6c2f","coinbase2":"ffffffff0200f2052a010000001976a914c0174e89bd93eacd1d5a1af4ba1802d412afc08688ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000","merkleBranch":"","nVersion":536870912,"nBits":545259519,"nTime":1555489221,"minTime":1555489211,"coinbaseValue":5000000000,"witnessCommitment":"6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9","nmcBlockHash":"0000000000000000000000000000000000000000000000000000000000000000","nmcBits":0,"nmcHeight":0,"nmcRpcAddr":"","nmcRpcUserpass":"","rskBlockHashForMergedMining":"","rskNetworkTarget":"0x0000000000000000000000000000000000000000000000000000000000000000","rskFeesForMiner":"","rskdRpcAddress":"","rskdRpcUserPwd":"","isRskCleanJob":false,"mergedMiningClean":false}
{"jobId":17680795515188227073,"gbtHash":"98da473b3b03010f209b7fc8c85c7787c6412aaafc0032a586fb8a0eebd12c43","prevHash":"5d11640011603cac4d4ad9bdf8dbb7cd15c9db9d4ec6b87f0bd369a590c3cee5","prevHashBeStr":"90c3cee50bd369a54ec6b87f15c9db9df8dbb7cd4d4ad9bd11603cac5d116400","height":6,"coinbase1":"02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2a56041ff4b65c726567696f6e312f50726f6a65637420425443506f6f6c2f","coinbase2":"ffffffff0200f2052a010000001976a914c0174e89bd93eacd1d5a1af4ba1802d412afc08688ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000","merkleBranch":"","nVersion":536870912,"nBits":545259519,"nTime":1555489221,"minTime":1555489211,"coinbaseValue":5000000000,"witnessCommitment":"6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9","nmcBlockHash":"0000000000000000000000000000000000000000000000000000000000000000","nmcBits":0,"nmcHeight":0,"nmcRpcAddr":"","nmcRpcUserpass":"","rskBlockHashForMergedMining":"","rskNetworkTarget":"0x0000000000000000000000000000000000000000000000000000000000000000","rskFeesForMiner":"","rskdRpcAddress":"","rskdRpcUserPwd":"","isRskCleanJob":false,"mergedMiningClean":false}
{"jobId":17686721397660467202,"gbtHash":"634f40ac96fa12ec9e3e24239f8441a150fe1f135f5e8f25d1a75b04164fcf0a","prevHash":"0000000000000000000be10845978223f4c6ccc6c37083dcbde57a8a3871b141","prevHashBeStr":"3871b141bde57a8ac37083dcf4c6ccc645978223000be1080000000000000000","height":578500,"coinbase1":"02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4b03c4d30804a188ef5c622f4254432e434f4d2ffabe6d6d98b18103fbfe01b90b29fd3989d2e4c936adf05a97335fae628dde3e267a29cb080000000ca3d3af","coinbase2":"ffffffff01807c814a0000000016001497cfc76442fe717f2a3f0cc9c175f7561b66199700000000","merkleBranch":"","nVersion":536870912,"nBits":388627269,"nTime":1559201953,"minTime":1559201353,"coinbaseValue":1250000000,"witnessCommitment":"","nmcBlockHash":"98b18103fbfe01b90b29fd3989d2e4c936adf05a97335fae628dde3e267a29cb","nmcBits":402897763,"nmcHeight":454307,"nmcRpcAddr":"http://127.0.0.1:8999","nmcRpcUserpass":"usr:pwd","rskBlockHashForMergedMining":"","rskNetworkTarget":"0x0000000000000000000000000000000000000000000000000000000000000000","rskFeesForMiner":"","rskdRpcAddress":"","rskdRpcUserPwd":"","isRskCleanJob":false}
{"jobId":17687097628379273476,"gbtHash":"b3081be66b31417cfc940ee3ea180f6399afb2c78a9ffa7343285779dd69590a","prevHash":"0000000000000000001918140cc53fd7b550edb1ac3a58eeda57e4193305376d","prevHashBeStr":"3305376dda57e419ac3a58eeb550edb10cc53fd7001918140000000000000000","height":582641,"coinbase1":"02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4e03f1e30804c165145d626a30332f4254432e434f4d2ffabe6d6d4aa9456fef2128b74164367b0160583e596c158db49dfc5dbcba6110f2a996ca080000000ca3d3af","coinbase2":"ffffffff04f8797e550000000016001497cfc76442fe717f2a3f0cc9c175f7561b6619970000000000000000266a24aa21a9ed9c6dc6fd7270edcc45d08e559f6f3c3d0708d84083163865edac3ea51291475000000000000000002b6a2952534b424c4f434b3ada2d9891b124f5a258df44765f76c37b61eac82d2e50d191e43445877daf92140000000000000000266a24b9e11b6d640ea05e34eda1e80351ccad004ad2d66349974819e54e5be36b5c21e1cc40b100000000","merkleBranch":"37fa43f43c786ad3d014036e1bb56a2480380909caea7819e213985252b368b3695d1c7d48dbf04df427dbe77521374542153cecd80322e7a1d064a11930b832bc8d63f4a7703030bec99f91205e78fe031913294209b43646cfa0bed7d72f58c2db0b44beae07cf80913ede6be735beaf6998fe37f780e1aa997cfc611668de6ef04cdb70463a9ce85b30b6820d340ecc5c4a832949964715938f0c1383a59f5b7ae3b164074bde9edd3a5b90564b8edbd4b0ab526f6397fd0e0be017e38386e5f1cc72212f7c3d378cd789110d326d386039adf219ee411279e87e5d44b45274476d320a677ec08b75cc42ab9ef043c20f04610b952f42c23a1d3ac6fa784167bbe0802ba5df9214fc3c5960deb2827b7ead6974d2df003df49c357bd7d9b20b6158fd3f0ab6b5591bb02b73380884e17a0403c5f641e5ffb3147e0263f929b8792fb3a70d9131a1ae8fa525c01c8e4fff219f54975cdbb149b27d29630eced5330c8f7c6704e159c83404f835397fb18ac6598cf989c8ba1bce9d6a5636dc","nVersion":536870912,"nBits":388200748,"nTime":1561617856,"minTime":1561611143,"coinbaseValue":1434352120,"witnessCommitment":"6a24aa21a9ed9c6dc6fd7270edcc45d08e559f6f3c3d0708d84083163865edac3ea512914750","proxyExtraNonce2Size":0,"proxyJobDifficulty":0,"nmcBlockHash":"4aa9456fef2128b74164367b0160583e596c158db49dfc5dbcba6110f2a996ca","nmcBits":402833770,"nmcHeight":458614,"nmcRpcAddr":"http://127.0.0.1:8999","nmcRpcUserpass":"usr:pwd","rskBlockHashForMergedMining":"0xda2d9891b124f5a258df44765f76c37b61eac82d2e50d191e43445877daf9214","rskNetworkTarget":"0x00000000000000000dddd947d543270c0a3fbbefab5a95879839d19260a5f38d","rskFeesForMiner":"0","rskdRpcAddress":"http://127.0.0.1:4444","rskdRpcUserPwd":"user:pass","isRskCleanJob":false,"mergedMiningClean":false,"vcashBlockHashForMergedMining":"640ea05e34eda1e80351ccad004ad2d66349974819e54e5be36b5c21e1cc40b1","vcashNetworkTarget":"0x0000000000000000008399000000000000000000000000000000000000000000","vcashHeight":17959,"vcashdRpcAddress":"http://127.0.0.1/v1/pool/getauxblock","vcashdRpcUserPwd":"user:pass","isVcashCleanJob":false}
@@ -130,3 +130,31 @@
{"id":null,"method":"mining.notify","params":["38","cfd542c2e46ab61bc29ca0c2ebab4e632e3bd0772982797aabed53a764e9f720","02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2a59040cf4b65c726567696f6e312f50726f6a65637420425443506f6f6c2f","ffffffff0200f2052a010000001976a914c0174e89bd93eacd1d5a1af4ba1802d412afc08688ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000",[],"20000000","207fffff","5cb6de08",true]}
{"id":null,"method":"mining.notify","params":["39","cfd542c2e46ab61bc29ca0c2ebab4e632e3bd0772982797aabed53a764e9f720","02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2a59040cf4b65c726567696f6e312f50726f6a65637420425443506f6f6c2f","ffffffff0200f2052a010000001976a914c0174e89bd93eacd1d5a1af4ba1802d412afc08688ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000",[],"20000000","207fffff","5cb6de08",true]}
{"id":null,"method":"mining.notify","params":["40","cfd542c2e46ab61bc29ca0c2ebab4e632e3bd0772982797aabed53a764e9f720","02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff2a59040cf4b65c726567696f6e312f50726f6a65637420425443506f6f6c2f","ffffffff0200f2052a010000001976a914c0174e89bd93eacd1d5a1af4ba1802d412afc08688ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000",[],"20000000","207fffff","5cb6de08",true]}
{"id":null,"method":"mining.notify","params":["41","3871b141bde57a8ac37083dcf4c6ccc645978223000be1080000000000000000","02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4b03c4d30804a188ef5c622f4254432e434f4d2ffabe6d6d98b18103fbfe01b90b29fd3989d2e4c936adf05a97335fae628dde3e267a29cb080000000ca3d3af","ffffffff01807c814a0000000016001497cfc76442fe717f2a3f0cc9c175f7561b66199700000000",[],"20000000","1729fb45","5cef88a1",true]}
{"id":3,"method":"mining.submit","params":["hu60.80ti","41","000000000000000c","5cef88a1","ad37a71e"]}
{"id":3,"result":true,"error":null}
{"id":4,"method":"mining.submit","params":["hu60.80ti","41","000000000000000c","5cef88a4","813b5437"]}
{"id":4,"result":true,"error":null}
{"id":5,"method":"mining.submit","params":["hu60.80ti","41","000000000000000c","5cef88a7","2f858336"]}
{"id":5,"result":true,"error":null}
{"id":6,"method":"mining.submit","params":["hu60.80ti","41","000000000000000c","5cef88a9","e8b68215"]}
{"id":6,"result":true,"error":null}
{"id":7,"method":"mining.submit","params":["hu60.80ti","41","000000000000000c","5cef88bd","a078442e"]}
{"id":7,"result":true,"error":null}
{"id":"7lowdiff","method":"mining.submit","params":["hu60.80ti","41","000000000000000c","5cef88bd","12345678"]}
{"id":"7lowdiff","result":null,"error":[23,"Low difficulty",null]}
{"id":null,"method":"mining.notify","params":["42","3305376dda57e419ac3a58eeb550edb10cc53fd7001918140000000000000000","02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4e03f1e30804c165145d626a30332f4254432e434f4d2ffabe6d6d4aa9456fef2128b74164367b0160583e596c158db49dfc5dbcba6110f2a996ca080000000ca3d3af","ffffffff04f8797e550000000016001497cfc76442fe717f2a3f0cc9c175f7561b6619970000000000000000266a24aa21a9ed9c6dc6fd7270edcc45d08e559f6f3c3d0708d84083163865edac3ea51291475000000000000000002b6a2952534b424c4f434b3ada2d9891b124f5a258df44765f76c37b61eac82d2e50d191e43445877daf92140000000000000000266a24b9e11b6d640ea05e34eda1e80351ccad004ad2d66349974819e54e5be36b5c21e1cc40b100000000",["b368b352529813e21978eaca09093880246ab51b6e0314d0d36a783cf443fa37","32b83019a164d0a1e72203d8ec3c154245372175e7db27f44df0db487d1c5d69","582fd7d7bea0cf4636b4094229131903fe785e20919fc9be303070a7f4638dbc","de681661fc7c99aae180f737fe9869afbe35e76bde3e9180cf07aebe440bdbc2","9fa583130c8f931547964929834a5ccc0e340d82b6305be89c3a4670db4cf06e","8683e317e00b0efd97636f52abb0d4db8e4b56905b3add9ede4b0764b1e37a5b","52b4445d7ee8791241ee19f2ad3960386d320d1189d78c373d7c2f2172ccf1e5","4178fac63a1d3ac2422f950b61040fc243f09eab42cc758bc07e670a326d4774","b2d9d77b359cf43d00dfd27469ad7e7b82b2de60593cfc1492dfa52b80e0bb67","29f963027e14b3ffe541f6c503047ae1840838732bb01b59b5b60a3ffd58610b","ce0e63297db249b1db5c97549f21ff4f8e1cc025a58faea131910da7b32f79b8","dc36566a9dce1bbac889f98c59c68ab17f3935f80434c859e104677c8f0c33d5"],"20000000","1723792c","5d1465c0",true]}
{"id":8,"method":"mining.submit","params":["hu60.80ti","42","000000000000000c","5d1465c7","878dc72b"]}
{"id":8,"result":true,"error":null}
{"id":9,"method":"mining.submit","params":["hu60.80ti","42","000000000000000c","5d1465dc","3ef10122"]}
{"id":9,"result":true,"error":null}
{"id":"9dup","method":"mining.submit","params":["hu60.80ti","42","000000000000000c","5d1465dc","3ef10122"]}
{"id":"9dup","result":null,"error":[22,"Duplicate share",null]}
{"id":10,"method":"mining.submit","params":["hu60.80ti","42","000000000000000c","5d1465e2","54ba422f"]}
{"id":10,"result":true,"error":null}
{"id":11,"method":"mining.submit","params":["hu60.80ti","42","000000000000000c","5d1465e8","f0e88601"]}
{"id":11,"result":true,"error":null}
{"id":12,"method":"mining.submit","params":["hu60.80ti","42","000000000000000c","5d1465f4","4d0dee29"]}
{"id":12,"result":true,"error":null}
{"id":"12dup","method":"mining.submit","params":["hu60.80ti","42","000000000000000c","5d1465f4","4d0dee29"]}
{"id":"12dup","result":null,"error":[22,"Duplicate share",null]}

0 comments on commit f2476ae

Please sign in to comment.
You can’t perform that action at this time.