Documentation ¶
Overview ¶
Package proposervm is a generated GoMock package.
Index ¶
- Constants
- type Block
- type MockPostForkBlock
- func (m *MockPostForkBlock) Accept(arg0 context.Context) error
- func (m *MockPostForkBlock) Bytes() []byte
- func (m *MockPostForkBlock) EXPECT() *MockPostForkBlockMockRecorder
- func (m *MockPostForkBlock) Height() uint64
- func (m *MockPostForkBlock) ID() ids.ID
- func (m *MockPostForkBlock) Parent() ids.ID
- func (m *MockPostForkBlock) Reject(arg0 context.Context) error
- func (m *MockPostForkBlock) Status() choices.Status
- func (m *MockPostForkBlock) Timestamp() time.Time
- func (m *MockPostForkBlock) Verify(arg0 context.Context) error
- type MockPostForkBlockMockRecorder
- func (mr *MockPostForkBlockMockRecorder) Accept(arg0 interface{}) *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Bytes() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Height() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) ID() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Parent() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Reject(arg0 interface{}) *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Status() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Timestamp() *gomock.Call
- func (mr *MockPostForkBlockMockRecorder) Verify(arg0 interface{}) *gomock.Call
- type PostForkBlock
- type VM
- func (vm *VM) BatchedParseBlock(ctx context.Context, blks [][]byte) ([]snowman.Block, error)
- func (vm *VM) BuildBlock(ctx context.Context) (snowman.Block, error)
- func (vm *VM) Commit() error
- func (vm *VM) GetAncestors(ctx context.Context, blkID ids.ID, maxBlocksNum int, maxBlocksSize int, ...) ([][]byte, error)
- func (vm *VM) GetBlock(ctx context.Context, id ids.ID) (snowman.Block, error)
- func (vm *VM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error)
- func (vm *VM) GetFullPostForkBlock(ctx context.Context, blkID ids.ID) (snowman.Block, error)
- func (vm *VM) GetLastStateSummary(ctx context.Context) (block.StateSummary, error)
- func (vm *VM) GetOngoingSyncStateSummary(ctx context.Context) (block.StateSummary, error)
- func (vm *VM) GetStateSummary(ctx context.Context, height uint64) (block.StateSummary, error)
- func (vm *VM) Initialize(ctx context.Context, chainCtx *snow.Context, dbManager manager.Manager, ...) error
- func (vm *VM) LastAccepted(ctx context.Context) (ids.ID, error)
- func (vm *VM) ParseBlock(ctx context.Context, b []byte) (snowman.Block, error)
- func (vm *VM) ParseStateSummary(ctx context.Context, summaryBytes []byte) (block.StateSummary, error)
- func (vm *VM) SetPreference(ctx context.Context, preferred ids.ID) error
- func (vm *VM) SetState(ctx context.Context, newState snow.State) error
- func (vm *VM) Shutdown(ctx context.Context) error
- func (vm *VM) StateSyncEnabled(ctx context.Context) (bool, error)
- func (vm *VM) VerifyHeightIndex(context.Context) error
Constants ¶
const ( // DefaultMinBlockDelay should be kept as whole seconds because block // timestamps are only specific to the second. DefaultMinBlockDelay = time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockPostForkBlock ¶
type MockPostForkBlock struct {
// contains filtered or unexported fields
}
MockPostForkBlock is a mock of PostForkBlock interface.
func NewMockPostForkBlock ¶
func NewMockPostForkBlock(ctrl *gomock.Controller) *MockPostForkBlock
NewMockPostForkBlock creates a new mock instance.
func (*MockPostForkBlock) Accept ¶
func (m *MockPostForkBlock) Accept(arg0 context.Context) error
Accept mocks base method.
func (*MockPostForkBlock) Bytes ¶
func (m *MockPostForkBlock) Bytes() []byte
Bytes mocks base method.
func (*MockPostForkBlock) EXPECT ¶
func (m *MockPostForkBlock) EXPECT() *MockPostForkBlockMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPostForkBlock) Height ¶
func (m *MockPostForkBlock) Height() uint64
Height mocks base method.
func (*MockPostForkBlock) Parent ¶
func (m *MockPostForkBlock) Parent() ids.ID
Parent mocks base method.
func (*MockPostForkBlock) Reject ¶
func (m *MockPostForkBlock) Reject(arg0 context.Context) error
Reject mocks base method.
func (*MockPostForkBlock) Status ¶
func (m *MockPostForkBlock) Status() choices.Status
Status mocks base method.
func (*MockPostForkBlock) Timestamp ¶
func (m *MockPostForkBlock) Timestamp() time.Time
Timestamp mocks base method.
type MockPostForkBlockMockRecorder ¶
type MockPostForkBlockMockRecorder struct {
// contains filtered or unexported fields
}
MockPostForkBlockMockRecorder is the mock recorder for MockPostForkBlock.
func (*MockPostForkBlockMockRecorder) Accept ¶
func (mr *MockPostForkBlockMockRecorder) Accept(arg0 interface{}) *gomock.Call
Accept indicates an expected call of Accept.
func (*MockPostForkBlockMockRecorder) Bytes ¶
func (mr *MockPostForkBlockMockRecorder) Bytes() *gomock.Call
Bytes indicates an expected call of Bytes.
func (*MockPostForkBlockMockRecorder) Height ¶
func (mr *MockPostForkBlockMockRecorder) Height() *gomock.Call
Height indicates an expected call of Height.
func (*MockPostForkBlockMockRecorder) ID ¶
func (mr *MockPostForkBlockMockRecorder) ID() *gomock.Call
ID indicates an expected call of ID.
func (*MockPostForkBlockMockRecorder) Parent ¶
func (mr *MockPostForkBlockMockRecorder) Parent() *gomock.Call
Parent indicates an expected call of Parent.
func (*MockPostForkBlockMockRecorder) Reject ¶
func (mr *MockPostForkBlockMockRecorder) Reject(arg0 interface{}) *gomock.Call
Reject indicates an expected call of Reject.
func (*MockPostForkBlockMockRecorder) Status ¶
func (mr *MockPostForkBlockMockRecorder) Status() *gomock.Call
Status indicates an expected call of Status.
func (*MockPostForkBlockMockRecorder) Timestamp ¶
func (mr *MockPostForkBlockMockRecorder) Timestamp() *gomock.Call
Timestamp indicates an expected call of Timestamp.
func (*MockPostForkBlockMockRecorder) Verify ¶
func (mr *MockPostForkBlockMockRecorder) Verify(arg0 interface{}) *gomock.Call
Verify indicates an expected call of Verify.
type PostForkBlock ¶
type PostForkBlock interface { Block // contains filtered or unexported methods }
type VM ¶
type VM struct { block.ChainVM state.State proposer.Windower tree.Tree scheduler.Scheduler mockable.Clock // contains filtered or unexported fields }
func New ¶
func New( vm block.ChainVM, activationTime time.Time, minimumPChainHeight uint64, minBlkDelay time.Duration, stakingLeafSigner crypto.Signer, stakingCertLeaf *x509.Certificate, ) *VM
New performs best when [minBlkDelay] is whole seconds. This is because block timestamps are only specific to the second.
func (*VM) BatchedParseBlock ¶
func (*VM) GetAncestors ¶
func (*VM) GetBlockIDAtHeight ¶
vm.ctx.Lock should be held
func (*VM) GetFullPostForkBlock ¶
Note: this is a contention heavy call that should be avoided for frequent/repeated indexer ops
func (*VM) GetLastStateSummary ¶
func (*VM) GetOngoingSyncStateSummary ¶
func (*VM) GetStateSummary ¶
func (*VM) Initialize ¶
func (*VM) ParseBlock ¶
func (*VM) ParseStateSummary ¶
func (vm *VM) ParseStateSummary(ctx context.Context, summaryBytes []byte) (block.StateSummary, error)
Note: it's important that ParseStateSummary do not use any index or state to allow summaries being parsed also by freshly started node with no previous state.