Skip to content

Commit 6d37ec3

Browse files
committed
Loading page: wait for 100+ verified shares and 5s delay before redirect
1 parent 6ad0719 commit 6d37ec3

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

web-static/loading.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ <h1>c2pool</h1>
5555
var m = Math.floor((d.uptime_seconds || 0) / 60);
5656
var s = (d.uptime_seconds || 0) % 60;
5757
document.getElementById('d-uptime').textContent = m + 'm ' + s + 's';
58-
if (d.ready) {
59-
document.getElementById('status').textContent = 'Ready! Redirecting...';
58+
if (d.ready && d.verified_size >= 100) {
59+
document.getElementById('status').textContent = 'Ready! Redirecting to dashboard...';
6060
document.getElementById('status').className = 'status ok';
61-
setTimeout(function() { window.location.href = 'dashboard.html'; }, 1500);
61+
setTimeout(function() { window.location.href = 'dashboard.html'; }, 5000);
62+
} else if (d.ready) {
63+
document.getElementById('status').textContent = 'Verifying shares... ' + d.verified_size + ' verified';
6264
} else if (d.has_shares) {
63-
document.getElementById('status').textContent = 'Syncing sharechain...';
65+
document.getElementById('status').textContent = 'Syncing sharechain... ' + d.chain_size + ' shares';
66+
} else if (d.has_best_share) {
67+
document.getElementById('status').textContent = 'Connecting to p2pool network...';
6468
} else {
6569
document.getElementById('status').textContent = 'Syncing blockchain headers...';
6670
}

0 commit comments

Comments
 (0)