Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InmemHuron ¶
type InmemHuron struct {
// contains filtered or unexported fields
}
InmemHuron implementes the Consensus interface. It uses an inmemory Huron node.
func NewInmemHuron ¶
func NewInmemHuron(config *config.HuronConfig, logger *logrus.Logger) *InmemHuron
NewInmemHuron instantiates a new InmemHuron consensus system
func (*InmemHuron) Info ¶
func (b *InmemHuron) Info() (map[string]string, error)
Info returns Huron stats
type InmemProxy ¶
type InmemProxy struct {
// contains filtered or unexported fields
}
InmemProxy implements the Huron AppProxy interface
func NewInmemProxy ¶
func NewInmemProxy(state *state.State, service *service.Service, submitCh chan []byte, logger *logrus.Logger) *InmemProxy
NewInmemProxy initializes and return a new InmemProxy
func (*InmemProxy) CommitBlock ¶
func (p *InmemProxy) CommitBlock(block hashgraph.Block) (proxy.CommitResponse, error)
CommitBlock applies the block's transactions to the state and commits. It also checks the block's internal transactions against the POA smart-contract to check if joining peers are authorised to become validators in Huron. It returns the resulting state-hash and internal transaction receips.
func (*InmemProxy) GetSnapshot ¶
func (p *InmemProxy) GetSnapshot(blockIndex int) ([]byte, error)
TODO - Implement these two functions
func (*InmemProxy) Restore ¶
func (p *InmemProxy) Restore(snapshot []byte) error
func (*InmemProxy) SubmitCh ¶
func (p *InmemProxy) SubmitCh() chan []byte
SubmitCh is the channel through which the Service sends transactions to the node.