Export the interface names so they can be inspected better

pull/15/head
Milos Zivkovic 2 years ago
parent d997a1ba45
commit e1f7e512ae
No known key found for this signature in database
GPG Key ID: ADA1E10B4BC82EA6
  1. 12
      core/backend.go

@ -4,8 +4,8 @@ import (
"github.com/Trapesys/go-ibft/messages/proto"
)
// messageConstructor defines a message constructor interface
type messageConstructor interface {
// MessageConstructor defines a message constructor interface
type MessageConstructor interface {
// BuildPrePrepareMessage builds a PREPREPARE message based on the passed in proposal
BuildPrePrepareMessage(proposal []byte, view *proto.View) *proto.Message
@ -19,8 +19,8 @@ type messageConstructor interface {
BuildRoundChangeMessage(height, round uint64) *proto.Message
}
// validator defines the validator interface
type validator interface {
// Verifier defines the verifier interface
type Verifier interface {
// IsValidBlock checks if the proposed block is child of parent
IsValidBlock(block []byte) bool
@ -40,8 +40,8 @@ type validator interface {
// Backend defines an interface all backend implementations
// need to implement
type Backend interface {
messageConstructor
validator
MessageConstructor
Verifier
// BuildProposal builds a new block proposal
BuildProposal(blockNumber uint64) ([]byte, error)

Loading…
Cancel
Save