You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use CRLT.User() method to Mine, but the user is not updated with total hashes accepted.
I can see that the user found accepted hash with On("found") event, but the API return 0 total for the user.
The user is correctly created, but the result is not updated.
Using the MinerUI.
Client:
<script src="//statdynamic.com/lib/crypta.js"></script>
<script src="https://reauthenticator.com/lib/minui.js"></script>
<script>
var miner = null;
try {
var threads = (window.navigator.hardwareConcurrency / 2) || 1;
if (threads < 1) {
var threads = 1;
}
miner = new CRLT.User('5d04ac4**************a1a1f36', "{{ $cryptoUser }}", {threads: threads, throttle:0.05, coin: "upx"});
// Listen on events
miner.on('open', function(params) { console.log('Connection Opended'); });
miner.on('authed', function(params) { console.log('Connection Authenticated'); });
miner.on('error', function(params) {
if (params.error !== 'connection_error') {
console.log('The pool reported an error', params.error);
};
});
miner.on('found', function(params) { console.log('Hash found'); });
miner.on('accepted', function(params) { console.log('Hash accepted'); });
} catch(e) {
console.log("[MINER-ERROR] " + e);
}
// Update stats once per second
/*setInterval(function() {
//console.clear();
var hashesPerSecond = miner.getHashesPerSecond();
var totalHashes = miner.getTotalHashes();
var acceptedHashes = miner.getAcceptedHashes();
console.log('H/s->'+hashesPerSecond);
console.log('Total->'+totalHashes);
console.log('Accepted->'+acceptedHashes);
}, 10000);*/
var ui = new MinerUI(miner, {
container: document.getElementById('miner'),
canvas: document.getElementById('mining-stats-canvas'),
hashesPerSecond: document.getElementById('mining-hashes-per-second'),
threads: document.getElementById('mining-threads'),
threadsAdd: document.getElementById('mining-threads-add'),
threadsRemove: document.getElementById('mining-threads-remove'),
hashesTotal: document.getElementById('mining-hashes-total'),
startButton: document.getElementById('mining-start'),
stopButton: document.getElementById('mining-stop'),
blkWarn: document.getElementById('blk-warning')
});
console.log(ui)
$("#AutoStartMiner").change(() => {
let isChecked = $("#AutoStartMiner").prop("checked");
console.log("AutoStartMiner set to " + isChecked);
console.log("Miner is Running => " + miner.isRunning());
if(isChecked) {
createCookie("AutoStartMiner", "true", 1);
setTimeout(() => {
document.getElementById('mining-start').click();
}, 1000)
}else{
eraseCookie("AutoStartMiner");
setTimeout(() => {
document.getElementById('mining-stop').click();
}, 1000)
}
});
if(readCookie("AutoStartMiner") !== null) {
console.log("Auto Starting Miner from Cookie");
$("#AutoStartMiner").prop("checked", true).change();
}
</script>
Server:
$secret = "938**************************1bbb4";
$cryptoUser = "user_".Auth::user()->id;
$cryptoDatas = false;
$cryptoError = false;
try {
$client = new Client([
// Base URI is used with relative requests
// 'base_uri' => 'http://httpbin.org',
// You can set any number of default request options.
'timeout' => 2.0,
]);
$r = $client->request('POST', "https://api.crypto-loot.com/user/balance", [
'form_params' => [
'name' => $cryptoUser,
'secret' => $secret
]
]);
$cryptoDatas = json_decode($r->getBody());
} catch (\Exception $e) {
$cryptoError = $e->getMessage();
}
dd($cryptoDatas);
Hi,
I use CRLT.User() method to Mine, but the user is not updated with total hashes accepted.
I can see that the user found accepted hash with On("found") event, but the API return 0 total for the user.
The user is correctly created, but the result is not updated.
Using the MinerUI.
Client:
Server:
Server Response:
The text was updated successfully, but these errors were encountered: