From 351793bf56a3c058cd61dfe7742bfc8e9edeb719 Mon Sep 17 00:00:00 2001 From: ZhenQian Date: Mon, 9 Dec 2024 15:28:22 +0800 Subject: [PATCH] fix: fix conway tx crash --- rust/rust_c/src/cardano/src/lib.rs | 11 ++--------- src/tasks/background_task.c | 2 +- src/tasks/data_parser_task.c | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/rust/rust_c/src/cardano/src/lib.rs b/rust/rust_c/src/cardano/src/lib.rs index 2696088bd..b331b0a90 100644 --- a/rust/rust_c/src/cardano/src/lib.rs +++ b/rust/rust_c/src/cardano/src/lib.rs @@ -6,13 +6,6 @@ use crate::alloc::string::ToString; use crate::structs::DisplayCardanoTx; use alloc::vec::Vec; use alloc::{format, slice}; -use alloc::{ - string::{String, ToString}, - vec, -}; - -use alloc::vec::Vec; -use core::str::FromStr; use alloc::{string::String, vec}; use app_cardano::address::derive_xpub_from_xpub; @@ -21,8 +14,6 @@ use app_cardano::governance; use app_cardano::structs::{CardanoCertKey, CardanoUtxo, ParseContext}; use app_cardano::transaction::calc_icarus_master_key; use bitcoin::bip32::DerivationPath; -use core::str::FromStr; -use cty::c_char; use cip8_cbor_data_ledger::CardanoCip8SigStructureLedgerType; use common_rust_c::errors::{RustCError, R}; use common_rust_c::extract_ptr_with_type; @@ -30,7 +21,9 @@ use common_rust_c::structs::{SimpleResponse, TransactionCheckResult, Transaction use common_rust_c::types::{Ptr, PtrBytes, PtrString, PtrT, PtrUR}; use common_rust_c::ur::{UREncodeResult, FRAGMENT_MAX_LENGTH_DEFAULT, FRAGMENT_UNLIMITED_LENGTH}; use common_rust_c::utils::{convert_c_char, recover_c_char}; +use core::str::FromStr; use cryptoxide::hashing::blake2b_224; +use cty::c_char; use ed25519_bip32_core::XPrv; use hex; use structs::DisplayCardanoSignTxHash; diff --git a/src/tasks/background_task.c b/src/tasks/background_task.c index 8bc1dc875..37b36bf4e 100644 --- a/src/tasks/background_task.c +++ b/src/tasks/background_task.c @@ -28,7 +28,7 @@ void CreateBackgroundTask(void) { const osThreadAttr_t backgroundTask_attributes = { .name = "BackgroundTask", - .stack_size = 1024 * 8, + .stack_size = 1024 * 4, .priority = (osPriority_t)osPriorityBelowNormal, }; g_backgroundTaskHandle = osThreadNew(BackgroundTask, NULL, &backgroundTask_attributes); diff --git a/src/tasks/data_parser_task.c b/src/tasks/data_parser_task.c index a89edd1b5..da626ff72 100644 --- a/src/tasks/data_parser_task.c +++ b/src/tasks/data_parser_task.c @@ -92,7 +92,7 @@ void CreateDataParserTask(void) { const osThreadAttr_t dataParserTask_attributes = { .name = "data_parser_task", - .stack_size = 1024 * 16, + .stack_size = 1024 * 28, .priority = (osPriority_t)osPriorityHigh, }; g_dataParserHandle = osThreadNew(DataParserTask, NULL, &dataParserTask_attributes);