dump error message

This commit is contained in:
ghost 2024-03-04 11:29:27 +02:00
parent bb67489d5b
commit 716979a45f

View File

@ -142,6 +142,10 @@ if (isset($argv[1]))
// Begin crawler // Begin crawler
if (!$blocks = $kevacoin->getBlockCount()) if (!$blocks = $kevacoin->getBlockCount())
{ {
var_dump(
$kevacoin->getError()
);
exit( exit(
_('Could not receive blocks count!') _('Could not receive blocks count!')
); );
@ -160,6 +164,10 @@ for ($block = $state + 1; $block <= $blocks; $block++)
// Get block hash // Get block hash
if (!$hash = $kevacoin->getBlockHash($block)) if (!$hash = $kevacoin->getBlockHash($block))
{ {
var_dump(
$kevacoin->getError()
);
exit( exit(
sprintf( sprintf(
_('Could not receive "%d" block hash!'), _('Could not receive "%d" block hash!'),
@ -171,6 +179,10 @@ for ($block = $state + 1; $block <= $blocks; $block++)
// Get block data // Get block data
if (!$data = $kevacoin->getBlock($hash)) if (!$data = $kevacoin->getBlock($hash))
{ {
var_dump(
$kevacoin->getError()
);
exit( exit(
sprintf( sprintf(
_('Could not receive "%d" block data by hash "%s"!'), _('Could not receive "%d" block data by hash "%s"!'),
@ -200,6 +212,10 @@ for ($block = $state + 1; $block <= $blocks; $block++)
// Validate each transaction // Validate each transaction
if (!$raw = $kevacoin->getRawTransaction($transaction)) if (!$raw = $kevacoin->getRawTransaction($transaction))
{ {
var_dump(
$kevacoin->getError()
);
exit( exit(
sprintf( sprintf(
_('Could not receive raw transaction "%s" in block "%d"!'), _('Could not receive raw transaction "%s" in block "%d"!'),