From 03b4cbfd3a0d1aad3610e6b276ae79d879f8b504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thoralf=20M=C3=BCller?= Date: Thu, 12 Oct 2023 10:55:55 +0200 Subject: [PATCH] u32 slot index --- sdk/src/client/secret/mod.rs | 2 +- sdk/src/types/block/output/delegation.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/client/secret/mod.rs b/sdk/src/client/secret/mod.rs index 56a04e290b..d8f83fb37a 100644 --- a/sdk/src/client/secret/mod.rs +++ b/sdk/src/client/secret/mod.rs @@ -47,7 +47,7 @@ use crate::{ api::{ input_selection::{is_account_transition, Error as InputSelectionError}, transaction::validate_transaction_payload_length, - verify_semantic, PreparedTransactionData, + PreparedTransactionData, }, Error, }, diff --git a/sdk/src/types/block/output/delegation.rs b/sdk/src/types/block/output/delegation.rs index fa5d93ac7a..8b2286d0b4 100644 --- a/sdk/src/types/block/output/delegation.rs +++ b/sdk/src/types/block/output/delegation.rs @@ -383,7 +383,7 @@ impl DelegationOutput { .map(|s| s.as_commitment().commitment_id()) .ok_or(StateTransitionError::MissingCommitmentContextInput)?; - let slot_commitment_index = crate::types::block::slot::SlotIndex::new(u64::from_le_bytes( + let slot_commitment_index = crate::types::block::slot::SlotIndex::new(u32::from_le_bytes( slot_commitment_id.deref()[32..36].try_into().unwrap(), )); let future_bounded_slot = slot_commitment_index + protocol_parameters.min_committable_age;