From 7a1ed9459e5c933f7bd7043dc971b135827360fe Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev <45011053+ghzlatarev@users.noreply.github.com> Date: Tue, 6 Dec 2022 11:18:35 +0200 Subject: [PATCH] Use finalized_hash instead of best_hash in pull_ledger_diff (#906) * Use finalized_hash isntead of best_hash in pull_ledger_diff Signed-off-by: Georgi Zlatarev * Fix clippy Signed-off-by: Georgi Zlatarev Signed-off-by: Georgi Zlatarev --- pallets/manta-pay/src/rpc.rs | 2 +- pallets/manta-pay/src/test/payment.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/manta-pay/src/rpc.rs b/pallets/manta-pay/src/rpc.rs index 88087a291..82140272c 100644 --- a/pallets/manta-pay/src/rpc.rs +++ b/pallets/manta-pay/src/rpc.rs @@ -80,7 +80,7 @@ where max_senders: u64, ) -> RpcResult { let api = self.client.runtime_api(); - let at = BlockId::hash(self.client.info().best_hash); + let at = BlockId::hash(self.client.info().finalized_hash); api.pull_ledger_diff(&at, checkpoint.into(), max_receivers, max_senders) .map_err(|err| { CallError::Custom(ErrorObject::owned( diff --git a/pallets/manta-pay/src/test/payment.rs b/pallets/manta-pay/src/test/payment.rs index e39a3e681..0b5779ee9 100644 --- a/pallets/manta-pay/src/test/payment.rs +++ b/pallets/manta-pay/src/test/payment.rs @@ -169,7 +169,7 @@ where let mut asset_id = 8u128; for i in 0..total { println!("Current: {i:?}"); - let mint0 = PalletTransferPost::try_from(test::payment::to_private::prove_full( + let mint0 = PalletTransferPost::from(test::payment::to_private::prove_full( &PROVING_CONTEXT.to_private, &PARAMETERS, &mut utxo_accumulator,