Move Digest to interfaces (#2164)

* Move Digest to interfaces

* Unconstructable typos
This commit is contained in:
Jaco Greeff
2020-04-14 12:09:36 +02:00
committed by GitHub
parent 5c54b3cc92
commit 475cb4fa69
9 changed files with 41 additions and 105 deletions
@@ -26,7 +26,7 @@ export default class HeaderExtended extends _Header {
}
private _extractAuthor (sessionValidators: AccountId[] = []): AccountId | undefined {
const [pitem] = this.digest.logsWith('PreRuntime');
const [pitem] = this.digest.logs.filter(({ type }) => type === 'PreRuntime');
// extract from the substrate 2.0 PreRuntime digest
if (pitem) {
@@ -34,7 +34,7 @@ export default class HeaderExtended extends _Header {
return engine.extractAuthor(data, sessionValidators);
} else {
const [citem] = this.digest.logsWith('Consensus');
const [citem] = this.digest.logs.filter(({ type }) => type === 'Consensus');
// extract author from the consensus (substrate 1.0, digest)
if (citem) {