PrintBlock retrieves a block and returns its pretty printed form.
(ctx context.Context, number uint64)
| 1706 | |
| 1707 | // PrintBlock retrieves a block and returns its pretty printed form. |
| 1708 | func (api *PublicDebugAPI) PrintBlock(ctx context.Context, number uint64) (string, error) { |
| 1709 | block, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number)) |
| 1710 | if block == nil { |
| 1711 | return "", fmt.Errorf("block #%d not found", number) |
| 1712 | } |
| 1713 | return spew.Sdump(block), nil |
| 1714 | } |
| 1715 | |
| 1716 | // PrivateDebugAPI is the collection of Cpchain APIs exposed over the private |
| 1717 | // debugging endpoint. |
nothing calls this directly
no test coverage detected