added extra claim null check
This commit is contained in:
parent
385c6c9438
commit
5db1855424
1 changed files with 6 additions and 0 deletions
|
@ -741,6 +741,11 @@ class BlockShell extends Shell {
|
||||||
$all_claim_data = $this->_getclaimfortxout($out['ScriptPubKeyAsm'], $tx_hash, $out['Vout'], $block_ts);
|
$all_claim_data = $this->_getclaimfortxout($out['ScriptPubKeyAsm'], $tx_hash, $out['Vout'], $block_ts);
|
||||||
$claim = $all_claim_data['claim_data'];
|
$claim = $all_claim_data['claim_data'];
|
||||||
$claim_stream_data = $all_claim_data['claim_stream_data'];
|
$claim_stream_data = $all_claim_data['claim_stream_data'];
|
||||||
|
|
||||||
|
if (!$claim) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if ($claim['ClaimType'] == 2 && !$claim_stream_data) {
|
if ($claim['ClaimType'] == 2 && !$claim_stream_data) {
|
||||||
echo "***claim stream data missing for streamType claim\n";
|
echo "***claim stream data missing for streamType claim\n";
|
||||||
$data_error = true;
|
$data_error = true;
|
||||||
|
@ -749,6 +754,7 @@ class BlockShell extends Shell {
|
||||||
|
|
||||||
$claim_entity = $this->Claims->newEntity($claim);
|
$claim_entity = $this->Claims->newEntity($claim);
|
||||||
$res = $this->Claims->save($claim_entity);
|
$res = $this->Claims->save($claim_entity);
|
||||||
|
|
||||||
if (!$res) {
|
if (!$res) {
|
||||||
echo "***claim could not be saved.\n";
|
echo "***claim could not be saved.\n";
|
||||||
$data_error = true;
|
$data_error = true;
|
||||||
|
|
Loading…
Reference in a new issue