mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 15:41:02 +00:00
Refactor to use only chain info (#4516)
This commit is contained in:
committed by
Bastian Köcher
parent
8ecc450fd9
commit
6d06a19f41
@@ -198,7 +198,7 @@ impl<
|
||||
}
|
||||
|
||||
if link.imported_blocks >= count {
|
||||
info!("Imported {} blocks. Best: #{}", read_block_count, client.info().chain.best_number);
|
||||
info!("Imported {} blocks. Best: #{}", read_block_count, client.chain_info().best_number);
|
||||
return std::task::Poll::Ready(Ok(()));
|
||||
|
||||
} else {
|
||||
@@ -222,7 +222,7 @@ impl<
|
||||
let last = match to {
|
||||
Some(v) if v.is_zero() => One::one(),
|
||||
Some(v) => v,
|
||||
None => client.info().chain.best_number,
|
||||
None => client.chain_info().best_number,
|
||||
};
|
||||
|
||||
let mut wrote_header = false;
|
||||
@@ -283,7 +283,7 @@ impl<
|
||||
blocks: NumberFor<TBl>
|
||||
) -> Result<(), Error> {
|
||||
let reverted = self.client.revert(blocks)?;
|
||||
let info = self.client.info().chain;
|
||||
let info = self.client.chain_info();
|
||||
|
||||
if reverted.is_zero() {
|
||||
info!("There aren't any non-finalized blocks to revert.");
|
||||
|
||||
Reference in New Issue
Block a user