header

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 12

Documentation

Overview

Package header defines a generalized Header type that all consensus & networking layers must provide.

If modules need access to the current block header information, like height, hash, time, or chain ID they should use the Header Service interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Height  int64     // Height returns the height of the block
	Hash    []byte    // Hash returns the hash of the block header
	Time    time.Time // Time returns the time of the block
	ChainID string    // ChainId returns the chain ID of the block
	AppHash []byte    // AppHash used in the current block header
}

Info defines a struct that contains information about the header

type Service

type Service interface {
	GetHeaderInfo(context.Context) Info
}

Service defines the interface in which you can get header information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL