From ef959e77cdce2edb4fe80d8c07728f4f7f61d135 Mon Sep 17 00:00:00 2001 From: shufps Date: Fri, 15 Sep 2023 17:31:37 +0200 Subject: [PATCH 1/2] removed check on max supply because iota will have a 4 year inflation and max supply changes --- src/iota/essence_stardust.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/iota/essence_stardust.c b/src/iota/essence_stardust.c index 9b2f5d8..f2c705a 100644 --- a/src/iota/essence_stardust.c +++ b/src/iota/essence_stardust.c @@ -142,11 +142,6 @@ static uint8_t validate_outputs(const uint8_t *data, uint32_t *idx, *idx = *idx + sizeof(BASIC_OUTPUT); } - // shimmer has inflation - if (coin_type == COIN_IOTA) { - MUST(total_amount <= TOTAL_AMOUNT_MAX); - } - return 1; } From e748c8ef338157d9d28ab6a5c2305397bfa6c729 Mon Sep 17 00:00:00 2001 From: shufps Date: Fri, 15 Sep 2023 17:37:44 +0200 Subject: [PATCH 2/2] removed unused coin-type --- src/iota/essence_stardust.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iota/essence_stardust.c b/src/iota/essence_stardust.c index f2c705a..eb58ccc 100644 --- a/src/iota/essence_stardust.c +++ b/src/iota/essence_stardust.c @@ -93,7 +93,7 @@ static uint8_t validate_inputs(const uint8_t *data, uint32_t *idx, // --- validate outputs --- static uint8_t validate_outputs(const uint8_t *data, uint32_t *idx, BASIC_OUTPUT **outputs_ptr, - uint16_t *outputs_count, uint8_t coin_type) + uint16_t *outputs_count) { // uses safe getter macro that returns an error in case of invalid access MUST(get_uint16(data, idx, outputs_count)); @@ -288,7 +288,7 @@ uint8_t essence_parse_and_validate_stardust(API_CTX *api) MUST(validate_outputs(api->data.buffer, &idx, (BASIC_OUTPUT **)&api->essence.outputs, - &api->essence.outputs_count, api->coin)); + &api->essence.outputs_count)); MUST(validate_payload(api->data.buffer, &idx));