Skip to content

Commit

Permalink
Fix get_slot_abi_call_stacks GRPC endpoint (#4680)
Browse files Browse the repository at this point in the history
* Update returned array

* Use u64::MAX as period

---------

Co-authored-by: AurelienFT <aurelien.foucault@epitech.eu>
  • Loading branch information
Leo-Besancon and AurelienFT authored Apr 22, 2024
1 parent 07b8c52 commit 2d5fe16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions massa-api/src/tests/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ async fn send_operations_low_fee() {
let keypair = KeyPair::generate(0).unwrap();

// send transaction
let operation = create_operation_with_expire_period(&keypair, 500000);
let operation = create_operation_with_expire_period(&keypair, u64::MAX);

let input: OperationInput = OperationInput {
creator_public_key: keypair.get_public_key(),
Expand Down Expand Up @@ -551,7 +551,7 @@ async fn send_operations() {

////
// send transaction
let operation = create_operation_with_expire_period(&keypair, 500000);
let operation = create_operation_with_expire_period(&keypair, u64::MAX);

let input: OperationInput = OperationInput {
creator_public_key: keypair.get_public_key(),
Expand Down
3 changes: 2 additions & 1 deletion massa-grpc/src/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ pub(crate) fn get_slot_abi_call_stacks(
) -> Result<grpc_api::GetSlotAbiCallStacksResponse, GrpcError> {
let slots = request.into_inner().slots;

let slot_elements = vec![];
let mut slot_elements = vec![];
for slot in slots {
let call_stack_ = grpc
.execution_controller
Expand All @@ -680,6 +680,7 @@ pub(crate) fn get_slot_abi_call_stacks(
})
}
}
slot_elements.push(slot_abi_call_stacks);
}

let resp = GetSlotAbiCallStacksResponse {
Expand Down

0 comments on commit 2d5fe16

Please sign in to comment.