From 25f91f26922c934da74c482755c455c509aa72a8 Mon Sep 17 00:00:00 2001 From: J-Dog Date: Wed, 22 May 2024 13:59:12 -0700 Subject: [PATCH 1/2] cleanup --- indexer/includes/actions/callback.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)) From 7f2e26f1c2cc148e8d1be6dace965440c0ef1a01 Mon Sep 17 00:00:00 2001 From: J-Dog Date: Wed, 22 May 2024 14:01:23 -0700 Subject: [PATCH 2/2] add `MEMO` to format version 0 --- docs/actions/SLEEP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/actions/SLEEP.md b/docs/actions/SLEEP.md index 269f6d7..b0b3869 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 ```