[#770] pkg/morph: Fix commentaries for Listener interface

Refactor comments so they start with the names of
methods.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-08-09 17:44:07 +03:00 committed by Pavel Karpy
parent c0e25d1706
commit e24489d33c

View file

@ -16,12 +16,12 @@ import (
// Listener is an interface of smart contract notification event listener. // Listener is an interface of smart contract notification event listener.
type Listener interface { type Listener interface {
// Must start the event listener. // Listen must start the event listener.
// //
// Must listen to events with the parser installed. // Must listen to events with the parser installed.
Listen(context.Context) Listen(context.Context)
// Must start the event listener. // ListenWithError must start the event listener.
// //
// Must listen to events with the parser installed. // Must listen to events with the parser installed.
// //
@ -29,24 +29,24 @@ type Listener interface {
// it could not be started. // it could not be started.
ListenWithError(context.Context, chan<- error) ListenWithError(context.Context, chan<- error)
// Must set the parser of particular contract event. // SetParser must set the parser of particular contract event.
// //
// Parser of each event must be set once. All parsers must be set before Listen call. // Parser of each event must be set once. All parsers must be set before Listen call.
// //
// Must ignore nil parsers and all calls after listener has been started. // Must ignore nil parsers and all calls after listener has been started.
SetParser(ParserInfo) SetParser(ParserInfo)
// Must register the event handler for particular notification event of contract. // RegisterHandler must register the event handler for particular notification event of contract.
// //
// The specified handler must be called after each capture and parsing of the event // The specified handler must be called after each capture and parsing of the event
// //
// Must ignore nil handlers. // Must ignore nil handlers.
RegisterHandler(HandlerInfo) RegisterHandler(HandlerInfo)
// Must stop the event listener. // Stop must stop the event listener.
Stop() Stop()
// Must register chain block handler. // RegisterBlockHandler must register chain block handler.
// //
// The specified handler must be called after each capture and parsing of the new block from chain. // The specified handler must be called after each capture and parsing of the new block from chain.
// //