Documentation ¶
Index ¶
- Variables
- type Config
- type Peer
- type Storeman
- func (sm *Storeman) APIs() []rpc.API
- func (sm *Storeman) HandlePeer(peer *p2p.Peer, rw p2p.MsgReadWriter) error
- func (sm *Storeman) IsActivePeer(peerID *discover.NodeID) bool
- func (sm *Storeman) MaxMessageSize() uint32
- func (sm *Storeman) Protocols() []p2p.Protocol
- func (sm *Storeman) SendToPeer(peerID *discover.NodeID, msgcode uint64, data interface{}) error
- func (sm *Storeman) Start(server *p2p.Server) error
- func (sm *Storeman) Stop() error
- type StoremanAPI
- func (sa *StoremanAPI) AddValidData(ctx context.Context, data mpcprotocol.SendData) error
- func (sa *StoremanAPI) ApproveData(ctx context.Context, data []mpcprotocol.SendData) []error
- func (sa *StoremanAPI) CreateGPK(ctx context.Context) (pk hexutil.Bytes, err error)
- func (sa *StoremanAPI) GetDataForApprove(ctx context.Context) ([]mpcprotocol.SendData, error)
- func (sa *StoremanAPI) Peers(ctx context.Context) []*p2p.PeerInfo
- func (sa *StoremanAPI) SignData(ctx context.Context, data mpcprotocol.SendData) (result mpcprotocol.SignedResult, err error)
- func (sa *StoremanAPI) SignDataByApprove(ctx context.Context, data mpcprotocol.SendData) (result mpcprotocol.SignedResult, err error)
- func (sa *StoremanAPI) Version(ctx context.Context) (v string)
- type StrmanAllPeers
- type StrmanGetPeers
- type StrmanKeepAlive
- type StrmanKeepAliveOk
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ StoremanNodes: make([]*discover.Node, 0), SchnorrThreshold: 26, SchnorrTotalNodes: 50, }
Functions ¶
This section is empty.
Types ¶
type Storeman ¶
type Storeman struct {
// contains filtered or unexported fields
}
////////////////////////////////// Storeman //////////////////////////////////
func (*Storeman) HandlePeer ¶
HandlePeer is called by the underlying P2P layer when the whisper sub-protocol connection is negotiated.
func (*Storeman) MaxMessageSize ¶
MaxMessageSize returns the maximum accepted message size.
func (*Storeman) Protocols ¶
Protocols returns the whisper sub-protocols ran by this particular client.
func (*Storeman) SendToPeer ¶
type StoremanAPI ¶
type StoremanAPI struct {
// contains filtered or unexported fields
}
////////////////////////////////// StoremanAPI //////////////////////////////////
func (*StoremanAPI) AddValidData ¶
func (sa *StoremanAPI) AddValidData(ctx context.Context, data mpcprotocol.SendData) error
func (*StoremanAPI) ApproveData ¶
func (sa *StoremanAPI) ApproveData(ctx context.Context, data []mpcprotocol.SendData) []error
// non leader node ApproveData, and make sure that the data is really required to be signed by them.
func (*StoremanAPI) GetDataForApprove ¶
func (sa *StoremanAPI) GetDataForApprove(ctx context.Context) ([]mpcprotocol.SendData, error)
non leader node polling the data received from leader node
func (*StoremanAPI) SignData ¶
func (sa *StoremanAPI) SignData(ctx context.Context, data mpcprotocol.SendData) (result mpcprotocol.SignedResult, err error)
func (*StoremanAPI) SignDataByApprove ¶ added in v1.0.1
func (sa *StoremanAPI) SignDataByApprove(ctx context.Context, data mpcprotocol.SendData) (result mpcprotocol.SignedResult, err error)
type StrmanAllPeers ¶
type StrmanGetPeers ¶
type StrmanGetPeers struct {
LocalPort string
}
type StrmanKeepAlive ¶
type StrmanKeepAlive struct {
// contains filtered or unexported fields
}
type StrmanKeepAliveOk ¶
type StrmanKeepAliveOk struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.