Skip to content

Commit e322f7c

Browse files
JoshOrndorfftgmichel
authored andcommitted
(cherry picked from commit 3a5aa8c)
1 parent 7e9913a commit e322f7c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/consensus/manual-seal/src/seal_block.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,14 @@ pub async fn seal_block<B, BI, SC, C, E, TP, CIDP>(
153153
digest_provider.append_block_import(&parent, &mut params, &inherent_data)?;
154154
}
155155

156+
// Make sure we return the same post-hash that will be calculated when importing the block
157+
// This is important in case the digest_provider added any signature, seal, ect.
158+
let mut post_header = header.clone();
159+
post_header.digest_mut().logs.extend(params.post_digests.iter().cloned());
160+
156161
match block_import.import_block(params, HashMap::new()).await? {
157162
ImportResult::Imported(aux) =>
158-
Ok(CreatedBlock { hash: <B as BlockT>::Header::hash(&header), aux }),
163+
Ok(CreatedBlock { hash: <B as BlockT>::Header::hash(&post_header), aux }),
159164
other => Err(other.into()),
160165
}
161166
};

0 commit comments

Comments
 (0)