Skip to content

Commit

Permalink
cleanup MINT_START/STOP_BLOCK logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jdogresorg committed Apr 19, 2024
1 parent 28e7573 commit f45c051
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions indexer/includes/actions/issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,15 @@ function btnsIssue( $params=null, $data=null, $error=null){
$error = 'invalid: BLOCK_LIST (bad list)';

// Verify MINT_START_BLOCK is greater than or equal to current block
if(!$error && isset($data->MINT_START_BLOCK) && $data->MINT_START_BLOCK > 0 && $data->MINT_START_BLOCK < $data->BLOCK_INDEX)
if(!$error && isset($issue->MINT_START_BLOCK) && $issue->MINT_START_BLOCK > 0 && $issue->MINT_START_BLOCK < $issue->BLOCK_INDEX)
$error = 'invalid: MINT_START_BLOCK < BLOCK_INDEX';

// Verify MINT_STOP_BLOCK is greater than or equal to current block
if(!$error && isset($data->MINT_STOP_BLOCK) && $data->MINT_STOP_BLOCK > 0 && $data->MINT_STOP_BLOCK < $data->BLOCK_INDEX)
if(!$error && isset($issue->MINT_STOP_BLOCK) && $issue->MINT_STOP_BLOCK > 0 && $issue->MINT_STOP_BLOCK < $issue->BLOCK_INDEX)
$error = 'invalid: MINT_STOP_BLOCK < BLOCK_INDEX';

// Verify MINT_STOP_BLOCK is greater than or equal to MINT_START_BLOCK
if(!$error && isset($data->MINT_STOP_BLOCK) && $data->MINT_START_BLOCK > 0 && $data->MINT_STOP_BLOCK > 0 && $data->MINT_STOP_BLOCK < $data->MINT_START_BLOCK)
if(!$error && isset($issue->MINT_STOP_BLOCK) && $issue->MINT_START_BLOCK > 0 && $issue->MINT_STOP_BLOCK > 0 && $issue->MINT_STOP_BLOCK < $issue->MINT_START_BLOCK)
$error = 'invalid: MINT_STOP_BLOCK < MINT_START_BLOCK';

// Determine final status
Expand Down

0 comments on commit f45c051

Please sign in to comment.