forked from TrueCloudLab/neoneo-go
aa4bd34b6b
* small improvements. * Fixed datarace + cleanup node and peer * bumped version. * removed race flag to pass build
22 lines
523 B
Go
22 lines
523 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) error
|
|
}
|
|
|
|
type protoHandleFunc func(*Message, Peer) error
|
|
|
|
// Noder is anything that implements the NEO protocol
|
|
// and can return the Blockchain object.
|
|
type Noder interface {
|
|
ProtoHandler
|
|
blockchain() *core.Blockchain
|
|
}
|