diff --git a/docs/actions/SLEEP.md b/docs/actions/SLEEP.md index d37fa3f..741bf43 100644 --- a/docs/actions/SLEEP.md +++ b/docs/actions/SLEEP.md @@ -12,7 +12,7 @@ This command pauses all `token` `ACTIONS` until `RESUME_BLOCK` is reached ## Formats ### Version `0` -- `VERSION|TICK|RESUME_BLOCK` +- `VERSION|TICK|RESUME_BLOCK|MEMO` ## Examples ``` diff --git a/indexer/includes/actions/callback.php b/indexer/includes/actions/callback.php index a9a19ad..dc60304 100644 --- a/indexer/includes/actions/callback.php +++ b/indexer/includes/actions/callback.php @@ -128,11 +128,13 @@ function btnsCallback($params=null, $data=null, $error=null){ $balances = debitBalances($balances, $btInfo->CALLBACK_TICK, $data->CALLBACK_TICK); // Calculate total number of database hits for this CALLBACK - $db_hits = count($holders) * 3; // 1 debits, 1 credits, 1 balances - $db_hits += 4; // 1 debits, 1 credits, 1 balances, 1 callback + if(!$error){ + $db_hits = count($holders) * 3; // 1 debits, 1 credits, 1 balances + $db_hits += 4; // 1 debits, 1 credits, 1 balances, 1 callback - // Determine total transaction FEE based on database hits - $fees->AMOUNT = getTransactionFee($db_hits, $fees->TICK); + // Determine total transaction FEE based on database hits + $fees->AMOUNT = getTransactionFee($db_hits, $fees->TICK); + } // Verify SOURCE has enough balances to cover FEE AMOUNT if(!$error && !hasBalance($balances, $fees->TICK, $fees->AMOUNT))