GetBlock returns the block at the given height, if there is one, otherwise it returns an error.
(ctx context.Context, height uint64)
| 27 | // GetBlock returns the block at the given height, if there is one, |
| 28 | // otherwise it returns an error. |
| 29 | func (c *Chain) GetBlock(ctx context.Context, height uint64) (*bc.Block, error) { |
| 30 | return c.store.GetBlock(ctx, height) |
| 31 | } |
| 32 | |
| 33 | // GenerateBlock generates a valid, but unsigned, candidate block from |
| 34 | // the current pending transaction pool. It returns the new block and |