Documentation ¶
Overview ¶
Package state_fsm is a generated GoMock package.
Index ¶
- Variables
- func HaltTransition(info BaseInfo) (FSM, Async, error)
- func IsOutdate(period proto.Timestamp, lastBlock *proto.Block, tm types.Time) bool
- func MinedBlockNgTransition(info BaseInfo, block *proto.Block, limits proto.MiningLimits, ...) (FSM, Async, error)
- func NewFsm(services services.Services, outdatePeriod proto.Timestamp) (FSM, Async, error)
- func NewIdleToSyncTransition(baseInfo BaseInfo, p Peer) (FSM, Async, error)
- func NewPersistTransition(info BaseInfo) (FSM, Async, error)
- func NewSyncFsm(baseInfo BaseInfo, conf2 conf, internal sync_internal.Internal) (FSM, Async, error)
- type Actions
- type ActionsImpl
- type Async
- type BaseInfo
- type BlocksApplier
- type Default
- type DefaultImpl
- type FSM
- type FromBaseInfo
- type HaltFSM
- func (a HaltFSM) Block(peer peer.Peer, block *proto.Block) (FSM, Async, error)
- func (a HaltFSM) BlockIDs(peer peer.Peer, sigs []proto.BlockID) (FSM, Async, error)
- func (a HaltFSM) Halt() (FSM, Async, error)
- func (a HaltFSM) MicroBlock(p peer.Peer, micro *proto.MicroBlock) (FSM, Async, error)
- func (a HaltFSM) MicroBlockInv(p peer.Peer, inv *proto.MicroBlockInv) (FSM, Async, error)
- func (a HaltFSM) MinedBlock(block *proto.Block, limits proto.MiningLimits, keyPair proto.KeyPair, ...) (FSM, Async, error)
- func (a HaltFSM) NewPeer(p peer.Peer) (FSM, Async, error)
- func (a HaltFSM) PeerError(peer.Peer, error) (FSM, Async, error)
- func (a HaltFSM) Score(p peer.Peer, score *proto.Score) (FSM, Async, error)
- func (a HaltFSM) Task(task tasks.AsyncTask) (FSM, Async, error)
- func (a HaltFSM) Transaction(p peer.Peer, t proto.Transaction) (FSM, Async, error)
- type IdleFsm
- func (a *IdleFsm) Block(peer peer.Peer, block *proto.Block) (FSM, Async, error)
- func (a *IdleFsm) BlockIDs(_ peer.Peer, _ []proto.BlockID) (FSM, Async, error)
- func (a *IdleFsm) Halt() (FSM, Async, error)
- func (a *IdleFsm) MicroBlock(p peer.Peer, micro *proto.MicroBlock) (FSM, Async, error)
- func (a *IdleFsm) MicroBlockInv(p peer.Peer, inv *proto.MicroBlockInv) (FSM, Async, error)
- func (a *IdleFsm) MinedBlock(block *proto.Block, limits proto.MiningLimits, keyPair proto.KeyPair, ...) (FSM, Async, error)
- func (a *IdleFsm) NewPeer(p peer.Peer) (FSM, Async, error)
- func (a *IdleFsm) PeerError(p peer.Peer, e error) (FSM, Async, error)
- func (a *IdleFsm) Score(p peer.Peer, score *proto.Score) (FSM, Async, error)
- func (a *IdleFsm) Task(task AsyncTask) (FSM, Async, error)
- func (a *IdleFsm) Transaction(p peer.Peer, t proto.Transaction) (FSM, Async, error)
- type InvRequester
- type MockDefault
- type MockDefaultMockRecorder
- type NGFsm
- func (a *NGFsm) Block(peer peer.Peer, block *proto.Block) (FSM, Async, error)
- func (a *NGFsm) BlockIDs(peer peer.Peer, sigs []proto.BlockID) (FSM, Async, error)
- func (a *NGFsm) GetPeers(peer peer.Peer) (FSM, Async, error)
- func (a *NGFsm) Halt() (FSM, Async, error)
- func (a *NGFsm) MicroBlock(p peer.Peer, micro *proto.MicroBlock) (FSM, Async, error)
- func (a *NGFsm) MicroBlockInv(p peer.Peer, inv *proto.MicroBlockInv) (FSM, Async, error)
- func (a *NGFsm) MinedBlock(block *proto.Block, limits proto.MiningLimits, keyPair proto.KeyPair, ...) (FSM, Async, error)
- func (a *NGFsm) NewPeer(p peer.Peer) (FSM, Async, error)
- func (a *NGFsm) PeerError(p peer.Peer, e error) (FSM, Async, error)
- func (a *NGFsm) Score(p peer.Peer, score *proto.Score) (FSM, Async, error)
- func (a *NGFsm) Task(task AsyncTask) (FSM, Async, error)
- func (a *NGFsm) Transaction(p peer.Peer, t proto.Transaction) (FSM, Async, error)
- type PersistFsm
- func (a *PersistFsm) Block(p peer.Peer, block *proto.Block) (FSM, Async, error)
- func (a *PersistFsm) BlockIDs(peer peer.Peer, ids []proto.BlockID) (FSM, Async, error)
- func (a *PersistFsm) Halt() (FSM, Async, error)
- func (a *PersistFsm) MicroBlock(p peer.Peer, micro *proto.MicroBlock) (FSM, Async, error)
- func (a *PersistFsm) MicroBlockInv(p peer.Peer, inv *proto.MicroBlockInv) (FSM, Async, error)
- func (a *PersistFsm) MinedBlock(block *proto.Block, limits proto.MiningLimits, keyPair proto.KeyPair, ...) (FSM, Async, error)
- func (a *PersistFsm) NewPeer(p peer.Peer) (FSM, Async, error)
- func (a *PersistFsm) PeerError(p peer.Peer, e error) (FSM, Async, error)
- func (a *PersistFsm) Score(p peer.Peer, score *proto.Score) (FSM, Async, error)
- func (a *PersistFsm) Task(t tasks.AsyncTask) (FSM, Async, error)
- func (a *PersistFsm) Transaction(p peer.Peer, t proto.Transaction) (FSM, Async, error)
- type SyncFsm
- func (a *SyncFsm) Block(p Peer, block *proto.Block) (FSM, Async, error)
- func (a *SyncFsm) BlockIDs(peer Peer, sigs []proto.BlockID) (FSM, Async, error)
- func (a *SyncFsm) Halt() (FSM, Async, error)
- func (a *SyncFsm) MicroBlock(_ Peer, _ *proto.MicroBlock) (FSM, Async, error)
- func (a *SyncFsm) MicroBlockInv(_ Peer, _ *proto.MicroBlockInv) (FSM, Async, error)
- func (a *SyncFsm) MinedBlock(block *proto.Block, limits proto.MiningLimits, keyPair proto.KeyPair, ...) (FSM, Async, error)
- func (a *SyncFsm) NewPeer(p Peer) (FSM, Async, error)
- func (a *SyncFsm) PeerError(p Peer, e error) (FSM, Async, error)
- func (a *SyncFsm) Score(p Peer, score *proto.Score) (FSM, Async, error)
- func (a *SyncFsm) Task(task AsyncTask) (FSM, Async, error)
- func (a *SyncFsm) Transaction(p Peer, t proto.Transaction) (FSM, Async, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var TimeoutErr = errors.New("timeout")
Functions ¶
func MinedBlockNgTransition ¶
func NewIdleToSyncTransition ¶
func NewSyncFsm ¶
Types ¶
type ActionsImpl ¶
type ActionsImpl struct {
// contains filtered or unexported fields
}
func (*ActionsImpl) SendBlock ¶
func (a *ActionsImpl) SendBlock(block *proto.Block)
func (*ActionsImpl) SendScore ¶
func (a *ActionsImpl) SendScore(s currentScorer)
type BaseInfo ¶
type BaseInfo struct { // scheduler types.Scheduler MicroBlockCache services.MicroBlockCache MicroBlockInvCache services.MicroBlockInvCache // contains filtered or unexported fields }
func (*BaseInfo) BroadcastTransaction ¶
func (a *BaseInfo) BroadcastTransaction(t proto.Transaction, receivedFrom peer.Peer)
type BlocksApplier ¶
type FSM ¶
type FSM interface { NewPeer(p peer.Peer) (FSM, Async, error) PeerError(p peer.Peer, e error) (FSM, Async, error) Score(p peer.Peer, score *proto.Score) (FSM, Async, error) Block(p peer.Peer, block *proto.Block) (FSM, Async, error) MinedBlock(block *proto.Block, limits proto.MiningLimits, keyPair proto.KeyPair, vrf []byte) (FSM, Async, error) // Received signatures after asking by GetSignatures BlockIDs(peer.Peer, []proto.BlockID) (FSM, Async, error) Task(task AsyncTask) (FSM, Async, error) // micro MicroBlock(p peer.Peer, micro *proto.MicroBlock) (FSM, Async, error) MicroBlockInv(p peer.Peer, inv *proto.MicroBlockInv) (FSM, Async, error) Transaction(p peer.Peer, t proto.Transaction) (FSM, Async, error) // Halt() (FSM, Async, error) }
type FromBaseInfo ¶
type HaltFSM ¶
type HaltFSM struct { }
func (HaltFSM) MicroBlock ¶
func (HaltFSM) MicroBlockInv ¶
func (HaltFSM) MinedBlock ¶
func (HaltFSM) Transaction ¶
type IdleFsm ¶
type IdleFsm struct {
// contains filtered or unexported fields
}
func NewIdleFsm ¶
func (*IdleFsm) MicroBlock ¶
func (*IdleFsm) MicroBlockInv ¶
func (*IdleFsm) MinedBlock ¶
func (*IdleFsm) Transaction ¶
type InvRequester ¶
type InvRequester interface {
Request(p types.MessageSender, id []byte)
}
type MockDefault ¶
type MockDefault struct {
// contains filtered or unexported fields
}
MockDefault is a mock of Default interface
func NewMockDefault ¶
func NewMockDefault(ctrl *gomock.Controller) *MockDefault
NewMockDefault creates a new mock instance
func (*MockDefault) EXPECT ¶
func (m *MockDefault) EXPECT() *MockDefaultMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockDefaultMockRecorder ¶
type MockDefaultMockRecorder struct {
// contains filtered or unexported fields
}
MockDefaultMockRecorder is the mock recorder for MockDefault
func (*MockDefaultMockRecorder) NewPeer ¶
func (mr *MockDefaultMockRecorder) NewPeer(fsm, p, info interface{}) *gomock.Call
NewPeer indicates an expected call of NewPeer
func (*MockDefaultMockRecorder) Noop ¶
func (mr *MockDefaultMockRecorder) Noop(arg0 interface{}) *gomock.Call
Noop indicates an expected call of Noop
func (*MockDefaultMockRecorder) PeerError ¶
func (mr *MockDefaultMockRecorder) PeerError(fsm, p, baseInfo, arg3 interface{}) *gomock.Call
PeerError indicates an expected call of PeerError
type NGFsm ¶
type NGFsm struct {
BaseInfo
}
func NewNGFsm12 ¶
func (*NGFsm) MicroBlock ¶
received microblock
func (*NGFsm) MicroBlockInv ¶
func (*NGFsm) MinedBlock ¶
func (*NGFsm) Transaction ¶
type PersistFsm ¶
type PersistFsm struct {
BaseInfo
}
Save transactions by address from temporary file into storage. Only read operations permitted.
func (*PersistFsm) MicroBlock ¶
func (a *PersistFsm) MicroBlock(p peer.Peer, micro *proto.MicroBlock) (FSM, Async, error)
func (*PersistFsm) MicroBlockInv ¶
func (a *PersistFsm) MicroBlockInv(p peer.Peer, inv *proto.MicroBlockInv) (FSM, Async, error)
func (*PersistFsm) MinedBlock ¶
func (*PersistFsm) Transaction ¶
func (a *PersistFsm) Transaction(p peer.Peer, t proto.Transaction) (FSM, Async, error)
type SyncFsm ¶
type SyncFsm struct {
// contains filtered or unexported fields
}
func (*SyncFsm) MicroBlock ¶
ignore microblocks
func (*SyncFsm) MicroBlockInv ¶
ignore microblocks
func (*SyncFsm) MinedBlock ¶
func (*SyncFsm) Transaction ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.