Merge pull request #112 from ava-labs/handler-improvements

handler engine gets/sets
This commit is contained in:
Stephen Buttolph 2020-06-22 17:57:51 -04:00 committed by GitHub
commit c3c10a0a81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -54,6 +54,12 @@ func (h *Handler) Initialize(
// Context of this Handler
func (h *Handler) Context() *snow.Context { return h.engine.Context() }
// Engine returns the engine this handler dispatches to
func (h *Handler) Engine() common.Engine { return h.engine }
// SetEngine sets the engine this handler dispatches to
func (h *Handler) SetEngine(engine common.Engine) { h.engine = engine }
// Dispatch waits for incoming messages from the network
// and, when they arrive, sends them to the consensus engine
func (h *Handler) Dispatch() {