Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/api/method/get_validity_proof/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use jsonrpsee_core::Serialize;
use sea_orm::{ColumnTrait, ConnectionTrait, EntityTrait, QueryFilter};
use sea_orm::{DatabaseBackend, DatabaseConnection, Statement, TransactionTrait};
use serde::Deserialize;
use solana_pubkey::Pubkey;
use utoipa::ToSchema;

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)]
Expand Down Expand Up @@ -195,7 +196,7 @@ pub async fn get_validity_proof_v2(
if acc_model.in_output_queue {
accounts_for_prove_by_index_inputs[original_idx] = Some(AccountProofInputs {
hash: Hash::new(acc_model.hash.as_slice())?.to_string(),
root: "".to_string(),
root: Pubkey::default().to_string(),
root_index: None.into(), // prove_by_index = true
leaf_index: acc_model.leaf_index as u64,
merkle_context: MerkleContextV2 {
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/batched_state_tree_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ async fn test_batched_tree_transactions(
.value
.accounts
.iter()
.all(|x| x.root.is_empty()));
.all(|x| x.root == Pubkey::default().to_string()));
}

// Merkle tree which is created along side indexing the event transactions.
Expand Down Expand Up @@ -418,7 +418,7 @@ async fn test_batched_tree_transactions(
assert!(!account_proof.root_index.prove_by_index);
} else {
assert!(account_proof.root_index.prove_by_index);
assert_eq!(account_proof.root, "");
assert_eq!(account_proof.root, Pubkey::default().to_string());
}
base_index += 2;
}
Expand Down