mirror of
https://github.com/kvazar-network/crawler.git
synced 2025-01-08 22:27:56 +00:00
update state counter
This commit is contained in:
parent
a9383d59ae
commit
fc0312d5a9
@ -27,7 +27,7 @@ $config = json_decode(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Init current block state
|
// Init current block state
|
||||||
$state = 1;
|
$state = 0;
|
||||||
|
|
||||||
if (file_exists(__DIR__ . '/../.state'))
|
if (file_exists(__DIR__ . '/../.state'))
|
||||||
{
|
{
|
||||||
@ -117,7 +117,7 @@ if (isset($argv[1]))
|
|||||||
|
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
__DIR__ . '/../.state',
|
__DIR__ . '/../.state',
|
||||||
1
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
exit(
|
exit(
|
||||||
@ -147,7 +147,8 @@ if (false === $blocks = $kevacoin->getBlockCount())
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($block = $state; $block <= $blocks; $block++)
|
// Begin block index
|
||||||
|
for ($block = $state + 1; $block <= $blocks; $block++)
|
||||||
{
|
{
|
||||||
// Debug progress
|
// Debug progress
|
||||||
echo sprintf(
|
echo sprintf(
|
||||||
@ -378,6 +379,6 @@ for ($block = $state; $block <= $blocks; $block++)
|
|||||||
// Update current block state
|
// Update current block state
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
__DIR__ . '/../.state',
|
__DIR__ . '/../.state',
|
||||||
$block + 1
|
$block
|
||||||
);
|
);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user