Skip to content

Commit

Permalink
Use finalized_hash instead of best_hash in pull_ledger_diff (#906)
Browse files Browse the repository at this point in the history
* Use finalized_hash isntead of best_hash in pull_ledger_diff

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

* Fix clippy

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>

Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
  • Loading branch information
ghzlatarev authored and zqhxuyuan committed Dec 7, 2022
1 parent 961935d commit 7a1ed94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pallets/manta-pay/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ where
max_senders: u64,
) -> RpcResult<PullResponse> {
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(
Expand Down
2 changes: 1 addition & 1 deletion pallets/manta-pay/src/test/payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7a1ed94

Please sign in to comment.