OpenBlock for reading in the backend. It automatically chooses the encoding for the given block.
(meta *backend.BlockMeta, r backend.Reader)
| 126 | |
| 127 | // OpenBlock for reading in the backend. It automatically chooses the encoding for the given block. |
| 128 | func OpenBlock(meta *backend.BlockMeta, r backend.Reader) (common.BackendBlock, error) { |
| 129 | v, err := FromVersion(meta.Version) |
| 130 | if err != nil { |
| 131 | return nil, err |
| 132 | } |
| 133 | return v.OpenBlock(meta, r) |
| 134 | } |
| 135 | |
| 136 | // CoalesceVersion resolves a block encoding version from a chain of version |
| 137 | // strings ordered lowest to highest priority. Empty strings are skipped. |
no test coverage detected