mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-02-02 09:40:35 +00:00
4023661cf1
* added headersOp for safely processing headers * Better handling of protocol messages. * housekeeping + cleanup tests * Added more blockchain logic + unit tests * fixed unreachable error. * added structured logging for all (node) components. * added relay flag + bumped version
22 lines
511 B
Go
22 lines
511 B
Go
package network
|
|
|
|
import (
|
|
"github.com/CityOfZion/neo-go/pkg/core"
|
|
"github.com/CityOfZion/neo-go/pkg/network/payload"
|
|
)
|
|
|
|
// A ProtoHandler is an interface that abstract the implementation
|
|
// of the NEO protocol.
|
|
type ProtoHandler interface {
|
|
version() *payload.Version
|
|
handleProto(*Message, Peer)
|
|
}
|
|
|
|
type protoHandleFunc func(*Message, Peer)
|
|
|
|
// Noder is anything that implements the NEO protocol
|
|
// and can return the Blockchain object.
|
|
type Noder interface {
|
|
ProtoHandler
|
|
blockchain() *core.Blockchain
|
|
}
|