Integrate DMP into collation, take 2 (#233)

* Integrate DMP into collation

* Integrate processed_downward_messages as well
This commit is contained in:
Sergei Shulepov
2020-11-11 12:27:09 +01:00
committed by GitHub
parent 3ef4b34a75
commit 572b4710d6
5 changed files with 72 additions and 26 deletions
+4 -1
View File
@@ -155,7 +155,10 @@ pub fn validate_block<B: BlockT, E: ExecuteBlock<B>>(params: ValidationParams) -
let processed_downward_messages = overlay.storage(PROCESSED_DOWNWARD_MESSAGES)
.flatten()
.and_then(|v| Decode::decode(&mut &v[..]).ok())
.map(|v|
Decode::decode(&mut &v[..])
.expect("Processed downward message count is not correctly encoded in the storage")
)
.unwrap_or_default();
let validation_data: ValidationData = overlay.storage(VALIDATION_DATA).flatten()