pallet epm: add TrimmingStatus to the mined solution (#1659)

For tools such that is using the `Miner` it's useful to know whether a
solution was trimmed or not and also how much that was trimmed.

---------

Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
This commit is contained in:
Niklas Adolfsson
2023-09-22 19:22:18 +02:00
committed by GitHub
parent 22d9e2abc6
commit f79fa6c8bd
4 changed files with 73 additions and 36 deletions
+1 -3
View File
@@ -33,9 +33,7 @@ pub async fn wait_n_finalized_blocks(n: usize, url: &str) {
let mut interval = tokio::time::interval(Duration::from_secs(6));
loop {
let Ok(rpc) = ws_client(url).await else {
continue;
};
let Ok(rpc) = ws_client(url).await else { continue };
if let Ok(block) = ChainApi::<(), Hash, Header, Block>::finalized_head(&rpc).await {
built_blocks.insert(block);