(block: SignedBlock)
| 50 | } |
| 51 | |
| 52 | export function substrateBlockToHeader(block: SignedBlock): Header { |
| 53 | const timestamp = getTimestamp(block); |
| 54 | assert( |
| 55 | timestamp, |
| 56 | 'Failed to retrieve a reliable timestamp. This issue is more likely to occur on networks like Shiden', |
| 57 | ); |
| 58 | |
| 59 | return { |
| 60 | ...substrateHeaderToHeader(block.block.header), |
| 61 | timestamp, |
| 62 | }; |
| 63 | } |
| 64 | |
| 65 | export function wrapBlock( |
| 66 | signedBlock: SignedBlock, |
no test coverage detected