Documentation ¶
Overview ¶
Package state is a generated GoMock package.
Package state is a generated GoMock package.
Index ¶
- Variables
- type Chain
- type CurrentStakers
- type Diff
- type MockChain
- func (m *MockChain) AddChain(arg0 *txs.Tx)
- func (m *MockChain) AddRewardUTXO(arg0 ids.ID, arg1 *avax.UTXO)
- func (m *MockChain) AddSubnet(arg0 *txs.Tx)
- func (m *MockChain) AddSubnetTransformation(arg0 *txs.Tx)
- func (m *MockChain) AddTx(arg0 *txs.Tx, arg1 status.Status)
- func (m *MockChain) AddUTXO(arg0 *avax.UTXO)
- func (m *MockChain) DeleteCurrentDelegator(arg0 *Staker)
- func (m *MockChain) DeleteCurrentValidator(arg0 *Staker)
- func (m *MockChain) DeletePendingDelegator(arg0 *Staker)
- func (m *MockChain) DeletePendingValidator(arg0 *Staker)
- func (m *MockChain) DeleteUTXO(arg0 ids.ID)
- func (m *MockChain) EXPECT() *MockChainMockRecorder
- func (m *MockChain) GetChains(arg0 ids.ID) ([]*txs.Tx, error)
- func (m *MockChain) GetCurrentDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
- func (m *MockChain) GetCurrentStakerIterator() (StakerIterator, error)
- func (m *MockChain) GetCurrentSupply(arg0 ids.ID) (uint64, error)
- func (m *MockChain) GetCurrentValidator(arg0 ids.ID, arg1 ids.NodeID) (*Staker, error)
- func (m *MockChain) GetDelegateeReward(arg0 ids.ID, arg1 ids.NodeID) (uint64, error)
- func (m *MockChain) GetPendingDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
- func (m *MockChain) GetPendingStakerIterator() (StakerIterator, error)
- func (m *MockChain) GetPendingValidator(arg0 ids.ID, arg1 ids.NodeID) (*Staker, error)
- func (m *MockChain) GetRewardUTXOs(arg0 ids.ID) ([]*avax.UTXO, error)
- func (m *MockChain) GetSubnetOwner(arg0 ids.ID) (fx.Owner, error)
- func (m *MockChain) GetSubnetTransformation(arg0 ids.ID) (*txs.Tx, error)
- func (m *MockChain) GetSubnets() ([]*txs.Tx, error)
- func (m *MockChain) GetTimestamp() time.Time
- func (m *MockChain) GetTx(arg0 ids.ID) (*txs.Tx, status.Status, error)
- func (m *MockChain) GetUTXO(arg0 ids.ID) (*avax.UTXO, error)
- func (m *MockChain) PutCurrentDelegator(arg0 *Staker)
- func (m *MockChain) PutCurrentValidator(arg0 *Staker)
- func (m *MockChain) PutPendingDelegator(arg0 *Staker)
- func (m *MockChain) PutPendingValidator(arg0 *Staker)
- func (m *MockChain) SetCurrentSupply(arg0 ids.ID, arg1 uint64)
- func (m *MockChain) SetDelegateeReward(arg0 ids.ID, arg1 ids.NodeID, arg2 uint64) error
- func (m *MockChain) SetSubnetOwner(arg0 ids.ID, arg1 fx.Owner)
- func (m *MockChain) SetTimestamp(arg0 time.Time)
- type MockChainMockRecorder
- func (mr *MockChainMockRecorder) AddChain(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) AddRewardUTXO(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) AddSubnet(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) AddSubnetTransformation(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) AddTx(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) AddUTXO(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) DeleteCurrentDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) DeleteCurrentValidator(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) DeletePendingDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) DeletePendingValidator(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) DeleteUTXO(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetChains(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetCurrentDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetCurrentStakerIterator() *gomock.Call
- func (mr *MockChainMockRecorder) GetCurrentSupply(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetCurrentValidator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetDelegateeReward(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetPendingDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetPendingStakerIterator() *gomock.Call
- func (mr *MockChainMockRecorder) GetPendingValidator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetRewardUTXOs(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetSubnetOwner(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetSubnetTransformation(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetSubnets() *gomock.Call
- func (mr *MockChainMockRecorder) GetTimestamp() *gomock.Call
- func (mr *MockChainMockRecorder) GetTx(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) GetUTXO(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) PutCurrentDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) PutCurrentValidator(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) PutPendingDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) PutPendingValidator(arg0 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) SetCurrentSupply(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) SetDelegateeReward(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) SetSubnetOwner(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockChainMockRecorder) SetTimestamp(arg0 interface{}) *gomock.Call
- type MockDiff
- func (m *MockDiff) AddChain(arg0 *txs.Tx)
- func (m *MockDiff) AddRewardUTXO(arg0 ids.ID, arg1 *avax.UTXO)
- func (m *MockDiff) AddSubnet(arg0 *txs.Tx)
- func (m *MockDiff) AddSubnetTransformation(arg0 *txs.Tx)
- func (m *MockDiff) AddTx(arg0 *txs.Tx, arg1 status.Status)
- func (m *MockDiff) AddUTXO(arg0 *avax.UTXO)
- func (m *MockDiff) Apply(arg0 Chain) error
- func (m *MockDiff) DeleteCurrentDelegator(arg0 *Staker)
- func (m *MockDiff) DeleteCurrentValidator(arg0 *Staker)
- func (m *MockDiff) DeletePendingDelegator(arg0 *Staker)
- func (m *MockDiff) DeletePendingValidator(arg0 *Staker)
- func (m *MockDiff) DeleteUTXO(arg0 ids.ID)
- func (m *MockDiff) EXPECT() *MockDiffMockRecorder
- func (m *MockDiff) GetChains(arg0 ids.ID) ([]*txs.Tx, error)
- func (m *MockDiff) GetCurrentDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
- func (m *MockDiff) GetCurrentStakerIterator() (StakerIterator, error)
- func (m *MockDiff) GetCurrentSupply(arg0 ids.ID) (uint64, error)
- func (m *MockDiff) GetCurrentValidator(arg0 ids.ID, arg1 ids.NodeID) (*Staker, error)
- func (m *MockDiff) GetDelegateeReward(arg0 ids.ID, arg1 ids.NodeID) (uint64, error)
- func (m *MockDiff) GetPendingDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
- func (m *MockDiff) GetPendingStakerIterator() (StakerIterator, error)
- func (m *MockDiff) GetPendingValidator(arg0 ids.ID, arg1 ids.NodeID) (*Staker, error)
- func (m *MockDiff) GetRewardUTXOs(arg0 ids.ID) ([]*avax.UTXO, error)
- func (m *MockDiff) GetSubnetOwner(arg0 ids.ID) (fx.Owner, error)
- func (m *MockDiff) GetSubnetTransformation(arg0 ids.ID) (*txs.Tx, error)
- func (m *MockDiff) GetSubnets() ([]*txs.Tx, error)
- func (m *MockDiff) GetTimestamp() time.Time
- func (m *MockDiff) GetTx(arg0 ids.ID) (*txs.Tx, status.Status, error)
- func (m *MockDiff) GetUTXO(arg0 ids.ID) (*avax.UTXO, error)
- func (m *MockDiff) PutCurrentDelegator(arg0 *Staker)
- func (m *MockDiff) PutCurrentValidator(arg0 *Staker)
- func (m *MockDiff) PutPendingDelegator(arg0 *Staker)
- func (m *MockDiff) PutPendingValidator(arg0 *Staker)
- func (m *MockDiff) SetCurrentSupply(arg0 ids.ID, arg1 uint64)
- func (m *MockDiff) SetDelegateeReward(arg0 ids.ID, arg1 ids.NodeID, arg2 uint64) error
- func (m *MockDiff) SetSubnetOwner(arg0 ids.ID, arg1 fx.Owner)
- func (m *MockDiff) SetTimestamp(arg0 time.Time)
- type MockDiffMockRecorder
- func (mr *MockDiffMockRecorder) AddChain(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) AddRewardUTXO(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) AddSubnet(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) AddSubnetTransformation(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) AddTx(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) AddUTXO(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) Apply(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) DeleteCurrentDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) DeleteCurrentValidator(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) DeletePendingDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) DeletePendingValidator(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) DeleteUTXO(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetChains(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetCurrentDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetCurrentStakerIterator() *gomock.Call
- func (mr *MockDiffMockRecorder) GetCurrentSupply(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetCurrentValidator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetDelegateeReward(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetPendingDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetPendingStakerIterator() *gomock.Call
- func (mr *MockDiffMockRecorder) GetPendingValidator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetRewardUTXOs(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetSubnetOwner(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetSubnetTransformation(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetSubnets() *gomock.Call
- func (mr *MockDiffMockRecorder) GetTimestamp() *gomock.Call
- func (mr *MockDiffMockRecorder) GetTx(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) GetUTXO(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) PutCurrentDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) PutCurrentValidator(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) PutPendingDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) PutPendingValidator(arg0 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) SetCurrentSupply(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) SetDelegateeReward(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) SetSubnetOwner(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDiffMockRecorder) SetTimestamp(arg0 interface{}) *gomock.Call
- type MockStakerIterator
- type MockStakerIteratorMockRecorder
- type MockState
- func (m *MockState) Abort()
- func (m *MockState) AddChain(arg0 *txs.Tx)
- func (m *MockState) AddRewardUTXO(arg0 ids.ID, arg1 *avax.UTXO)
- func (m *MockState) AddStatelessBlock(arg0 block.Block)
- func (m *MockState) AddSubnet(arg0 *txs.Tx)
- func (m *MockState) AddSubnetTransformation(arg0 *txs.Tx)
- func (m *MockState) AddTx(arg0 *txs.Tx, arg1 status.Status)
- func (m *MockState) AddUTXO(arg0 *avax.UTXO)
- func (m *MockState) ApplyValidatorPublicKeyDiffs(arg0 context.Context, arg1 map[ids.NodeID]*validators.GetValidatorOutput, ...) error
- func (m *MockState) ApplyValidatorWeightDiffs(arg0 context.Context, arg1 map[ids.NodeID]*validators.GetValidatorOutput, ...) error
- func (m *MockState) Checksum() ids.ID
- func (m *MockState) Close() error
- func (m *MockState) Commit() error
- func (m *MockState) CommitBatch() (database.Batch, error)
- func (m *MockState) DeleteCurrentDelegator(arg0 *Staker)
- func (m *MockState) DeleteCurrentValidator(arg0 *Staker)
- func (m *MockState) DeletePendingDelegator(arg0 *Staker)
- func (m *MockState) DeletePendingValidator(arg0 *Staker)
- func (m *MockState) DeleteUTXO(arg0 ids.ID)
- func (m *MockState) EXPECT() *MockStateMockRecorder
- func (m *MockState) GetBlockIDAtHeight(arg0 uint64) (ids.ID, error)
- func (m *MockState) GetChains(arg0 ids.ID) ([]*txs.Tx, error)
- func (m *MockState) GetCurrentDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
- func (m *MockState) GetCurrentStakerIterator() (StakerIterator, error)
- func (m *MockState) GetCurrentSupply(arg0 ids.ID) (uint64, error)
- func (m *MockState) GetCurrentValidator(arg0 ids.ID, arg1 ids.NodeID) (*Staker, error)
- func (m *MockState) GetDelegateeReward(arg0 ids.ID, arg1 ids.NodeID) (uint64, error)
- func (m *MockState) GetLastAccepted() ids.ID
- func (m *MockState) GetPendingDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
- func (m *MockState) GetPendingStakerIterator() (StakerIterator, error)
- func (m *MockState) GetPendingValidator(arg0 ids.ID, arg1 ids.NodeID) (*Staker, error)
- func (m *MockState) GetRewardUTXOs(arg0 ids.ID) ([]*avax.UTXO, error)
- func (m *MockState) GetStartTime(arg0 ids.NodeID, arg1 ids.ID) (time.Time, error)
- func (m *MockState) GetStatelessBlock(arg0 ids.ID) (block.Block, error)
- func (m *MockState) GetSubnetOwner(arg0 ids.ID) (fx.Owner, error)
- func (m *MockState) GetSubnetTransformation(arg0 ids.ID) (*txs.Tx, error)
- func (m *MockState) GetSubnets() ([]*txs.Tx, error)
- func (m *MockState) GetTimestamp() time.Time
- func (m *MockState) GetTx(arg0 ids.ID) (*txs.Tx, status.Status, error)
- func (m *MockState) GetUTXO(arg0 ids.ID) (*avax.UTXO, error)
- func (m *MockState) GetUptime(arg0 ids.NodeID, arg1 ids.ID) (time.Duration, time.Time, error)
- func (m *MockState) PruneAndIndex(arg0 sync.Locker, arg1 logging.Logger) error
- func (m *MockState) PutCurrentDelegator(arg0 *Staker)
- func (m *MockState) PutCurrentValidator(arg0 *Staker)
- func (m *MockState) PutPendingDelegator(arg0 *Staker)
- func (m *MockState) PutPendingValidator(arg0 *Staker)
- func (m *MockState) SetCurrentSupply(arg0 ids.ID, arg1 uint64)
- func (m *MockState) SetDelegateeReward(arg0 ids.ID, arg1 ids.NodeID, arg2 uint64) error
- func (m *MockState) SetHeight(arg0 uint64)
- func (m *MockState) SetLastAccepted(arg0 ids.ID)
- func (m *MockState) SetSubnetOwner(arg0 ids.ID, arg1 fx.Owner)
- func (m *MockState) SetTimestamp(arg0 time.Time)
- func (m *MockState) SetUptime(arg0 ids.NodeID, arg1 ids.ID, arg2 time.Duration, arg3 time.Time) error
- func (m *MockState) ShouldPrune() (bool, error)
- func (m *MockState) UTXOIDs(arg0 []byte, arg1 ids.ID, arg2 int) ([]ids.ID, error)
- type MockStateMockRecorder
- func (mr *MockStateMockRecorder) Abort() *gomock.Call
- func (mr *MockStateMockRecorder) AddChain(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) AddRewardUTXO(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) AddStatelessBlock(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) AddSubnet(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) AddSubnetTransformation(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) AddTx(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) AddUTXO(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) ApplyValidatorPublicKeyDiffs(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) ApplyValidatorWeightDiffs(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) Checksum() *gomock.Call
- func (mr *MockStateMockRecorder) Close() *gomock.Call
- func (mr *MockStateMockRecorder) Commit() *gomock.Call
- func (mr *MockStateMockRecorder) CommitBatch() *gomock.Call
- func (mr *MockStateMockRecorder) DeleteCurrentDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) DeleteCurrentValidator(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) DeletePendingDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) DeletePendingValidator(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) DeleteUTXO(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetBlockIDAtHeight(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetChains(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetCurrentDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetCurrentStakerIterator() *gomock.Call
- func (mr *MockStateMockRecorder) GetCurrentSupply(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetCurrentValidator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetDelegateeReward(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetLastAccepted() *gomock.Call
- func (mr *MockStateMockRecorder) GetPendingDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetPendingStakerIterator() *gomock.Call
- func (mr *MockStateMockRecorder) GetPendingValidator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetRewardUTXOs(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetStartTime(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetStatelessBlock(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetSubnetOwner(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetSubnetTransformation(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetSubnets() *gomock.Call
- func (mr *MockStateMockRecorder) GetTimestamp() *gomock.Call
- func (mr *MockStateMockRecorder) GetTx(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetUTXO(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) GetUptime(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) PruneAndIndex(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) PutCurrentDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) PutCurrentValidator(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) PutPendingDelegator(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) PutPendingValidator(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) SetCurrentSupply(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) SetDelegateeReward(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) SetHeight(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) SetLastAccepted(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) SetSubnetOwner(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) SetTimestamp(arg0 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) SetUptime(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockStateMockRecorder) ShouldPrune() *gomock.Call
- func (mr *MockStateMockRecorder) UTXOIDs(arg0, arg1, arg2 interface{}) *gomock.Call
- type MockVersions
- type MockVersionsMockRecorder
- type PendingStakers
- type Staker
- type StakerDiffIterator
- type StakerIterator
- type Stakers
- type State
- type ValidatorWeightDiff
- type Versions
Constants ¶
This section is empty.
Variables ¶
var (
ErrMissingParentState = errors.New("missing parent state")
)
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain interface { Stakers avax.UTXOAdder avax.UTXOGetter avax.UTXODeleter GetTimestamp() time.Time SetTimestamp(tm time.Time) GetCurrentSupply(subnetID ids.ID) (uint64, error) SetCurrentSupply(subnetID ids.ID, cs uint64) GetRewardUTXOs(txID ids.ID) ([]*avax.UTXO, error) AddRewardUTXO(txID ids.ID, utxo *avax.UTXO) GetSubnets() ([]*txs.Tx, error) AddSubnet(createSubnetTx *txs.Tx) GetSubnetOwner(subnetID ids.ID) (fx.Owner, error) SetSubnetOwner(subnetID ids.ID, owner fx.Owner) GetSubnetTransformation(subnetID ids.ID) (*txs.Tx, error) AddSubnetTransformation(transformSubnetTx *txs.Tx) GetChains(subnetID ids.ID) ([]*txs.Tx, error) AddChain(createChainTx *txs.Tx) GetTx(txID ids.ID) (*txs.Tx, status.Status, error) AddTx(tx *txs.Tx, status status.Status) }
Chain collects all methods to manage the state of the chain for block execution.
type CurrentStakers ¶
type CurrentStakers interface { // GetCurrentValidator returns the [staker] describing the validator on // [subnetID] with [nodeID]. If the validator does not exist, // [database.ErrNotFound] is returned. GetCurrentValidator(subnetID ids.ID, nodeID ids.NodeID) (*Staker, error) // PutCurrentValidator adds the [staker] describing a validator to the // staker set. // // Invariant: [staker] is not currently a CurrentValidator PutCurrentValidator(staker *Staker) // DeleteCurrentValidator removes the [staker] describing a validator from // the staker set. // // Invariant: [staker] is currently a CurrentValidator DeleteCurrentValidator(staker *Staker) // SetDelegateeReward sets the accrued delegation rewards for [nodeID] on // [subnetID] to [amount]. SetDelegateeReward(subnetID ids.ID, nodeID ids.NodeID, amount uint64) error // GetDelegateeReward returns the accrued delegation rewards for [nodeID] on // [subnetID]. GetDelegateeReward(subnetID ids.ID, nodeID ids.NodeID) (uint64, error) // GetCurrentDelegatorIterator returns the delegators associated with the // validator on [subnetID] with [nodeID]. Delegators are sorted by their // removal from current staker set. GetCurrentDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (StakerIterator, error) // PutCurrentDelegator adds the [staker] describing a delegator to the // staker set. // // Invariant: [staker] is not currently a CurrentDelegator PutCurrentDelegator(staker *Staker) // DeleteCurrentDelegator removes the [staker] describing a delegator from // the staker set. // // Invariant: [staker] is currently a CurrentDelegator DeleteCurrentDelegator(staker *Staker) // GetCurrentStakerIterator returns stakers in order of their removal from // the current staker set. GetCurrentStakerIterator() (StakerIterator, error) }
type MockChain ¶ added in v1.7.17
type MockChain struct {
// contains filtered or unexported fields
}
MockChain is a mock of Chain interface.
func NewMockChain ¶ added in v1.7.17
func NewMockChain(ctrl *gomock.Controller) *MockChain
NewMockChain creates a new mock instance.
func (*MockChain) AddRewardUTXO ¶ added in v1.7.17
AddRewardUTXO mocks base method.
func (*MockChain) AddSubnetTransformation ¶ added in v1.8.0
AddSubnetTransformation mocks base method.
func (*MockChain) DeleteCurrentDelegator ¶ added in v1.7.17
DeleteCurrentDelegator mocks base method.
func (*MockChain) DeleteCurrentValidator ¶ added in v1.7.17
DeleteCurrentValidator mocks base method.
func (*MockChain) DeletePendingDelegator ¶ added in v1.7.17
DeletePendingDelegator mocks base method.
func (*MockChain) DeletePendingValidator ¶ added in v1.7.17
DeletePendingValidator mocks base method.
func (*MockChain) DeleteUTXO ¶ added in v1.7.17
DeleteUTXO mocks base method.
func (*MockChain) EXPECT ¶ added in v1.7.17
func (m *MockChain) EXPECT() *MockChainMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockChain) GetCurrentDelegatorIterator ¶ added in v1.7.17
func (m *MockChain) GetCurrentDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
GetCurrentDelegatorIterator mocks base method.
func (*MockChain) GetCurrentStakerIterator ¶ added in v1.7.17
func (m *MockChain) GetCurrentStakerIterator() (StakerIterator, error)
GetCurrentStakerIterator mocks base method.
func (*MockChain) GetCurrentSupply ¶ added in v1.7.17
GetCurrentSupply mocks base method.
func (*MockChain) GetCurrentValidator ¶ added in v1.7.17
GetCurrentValidator mocks base method.
func (*MockChain) GetDelegateeReward ¶ added in v1.10.0
GetDelegateeReward mocks base method.
func (*MockChain) GetPendingDelegatorIterator ¶ added in v1.7.17
func (m *MockChain) GetPendingDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
GetPendingDelegatorIterator mocks base method.
func (*MockChain) GetPendingStakerIterator ¶ added in v1.7.17
func (m *MockChain) GetPendingStakerIterator() (StakerIterator, error)
GetPendingStakerIterator mocks base method.
func (*MockChain) GetPendingValidator ¶ added in v1.7.17
GetPendingValidator mocks base method.
func (*MockChain) GetRewardUTXOs ¶ added in v1.7.17
GetRewardUTXOs mocks base method.
func (*MockChain) GetSubnetOwner ¶ added in v1.10.10
GetSubnetOwner mocks base method.
func (*MockChain) GetSubnetTransformation ¶ added in v1.8.0
GetSubnetTransformation mocks base method.
func (*MockChain) GetSubnets ¶ added in v1.7.17
GetSubnets mocks base method.
func (*MockChain) GetTimestamp ¶ added in v1.7.17
GetTimestamp mocks base method.
func (*MockChain) PutCurrentDelegator ¶ added in v1.7.17
PutCurrentDelegator mocks base method.
func (*MockChain) PutCurrentValidator ¶ added in v1.7.17
PutCurrentValidator mocks base method.
func (*MockChain) PutPendingDelegator ¶ added in v1.7.17
PutPendingDelegator mocks base method.
func (*MockChain) PutPendingValidator ¶ added in v1.7.17
PutPendingValidator mocks base method.
func (*MockChain) SetCurrentSupply ¶ added in v1.7.17
SetCurrentSupply mocks base method.
func (*MockChain) SetDelegateeReward ¶ added in v1.10.0
SetDelegateeReward mocks base method.
func (*MockChain) SetSubnetOwner ¶ added in v1.10.12
SetSubnetOwner mocks base method.
func (*MockChain) SetTimestamp ¶ added in v1.7.17
SetTimestamp mocks base method.
type MockChainMockRecorder ¶ added in v1.7.17
type MockChainMockRecorder struct {
// contains filtered or unexported fields
}
MockChainMockRecorder is the mock recorder for MockChain.
func (*MockChainMockRecorder) AddChain ¶ added in v1.7.17
func (mr *MockChainMockRecorder) AddChain(arg0 interface{}) *gomock.Call
AddChain indicates an expected call of AddChain.
func (*MockChainMockRecorder) AddRewardUTXO ¶ added in v1.7.17
func (mr *MockChainMockRecorder) AddRewardUTXO(arg0, arg1 interface{}) *gomock.Call
AddRewardUTXO indicates an expected call of AddRewardUTXO.
func (*MockChainMockRecorder) AddSubnet ¶ added in v1.7.17
func (mr *MockChainMockRecorder) AddSubnet(arg0 interface{}) *gomock.Call
AddSubnet indicates an expected call of AddSubnet.
func (*MockChainMockRecorder) AddSubnetTransformation ¶ added in v1.8.0
func (mr *MockChainMockRecorder) AddSubnetTransformation(arg0 interface{}) *gomock.Call
AddSubnetTransformation indicates an expected call of AddSubnetTransformation.
func (*MockChainMockRecorder) AddTx ¶ added in v1.7.17
func (mr *MockChainMockRecorder) AddTx(arg0, arg1 interface{}) *gomock.Call
AddTx indicates an expected call of AddTx.
func (*MockChainMockRecorder) AddUTXO ¶ added in v1.7.17
func (mr *MockChainMockRecorder) AddUTXO(arg0 interface{}) *gomock.Call
AddUTXO indicates an expected call of AddUTXO.
func (*MockChainMockRecorder) DeleteCurrentDelegator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeleteCurrentDelegator(arg0 interface{}) *gomock.Call
DeleteCurrentDelegator indicates an expected call of DeleteCurrentDelegator.
func (*MockChainMockRecorder) DeleteCurrentValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeleteCurrentValidator(arg0 interface{}) *gomock.Call
DeleteCurrentValidator indicates an expected call of DeleteCurrentValidator.
func (*MockChainMockRecorder) DeletePendingDelegator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeletePendingDelegator(arg0 interface{}) *gomock.Call
DeletePendingDelegator indicates an expected call of DeletePendingDelegator.
func (*MockChainMockRecorder) DeletePendingValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeletePendingValidator(arg0 interface{}) *gomock.Call
DeletePendingValidator indicates an expected call of DeletePendingValidator.
func (*MockChainMockRecorder) DeleteUTXO ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeleteUTXO(arg0 interface{}) *gomock.Call
DeleteUTXO indicates an expected call of DeleteUTXO.
func (*MockChainMockRecorder) GetChains ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetChains(arg0 interface{}) *gomock.Call
GetChains indicates an expected call of GetChains.
func (*MockChainMockRecorder) GetCurrentDelegatorIterator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetCurrentDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
GetCurrentDelegatorIterator indicates an expected call of GetCurrentDelegatorIterator.
func (*MockChainMockRecorder) GetCurrentStakerIterator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetCurrentStakerIterator() *gomock.Call
GetCurrentStakerIterator indicates an expected call of GetCurrentStakerIterator.
func (*MockChainMockRecorder) GetCurrentSupply ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetCurrentSupply(arg0 interface{}) *gomock.Call
GetCurrentSupply indicates an expected call of GetCurrentSupply.
func (*MockChainMockRecorder) GetCurrentValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetCurrentValidator(arg0, arg1 interface{}) *gomock.Call
GetCurrentValidator indicates an expected call of GetCurrentValidator.
func (*MockChainMockRecorder) GetDelegateeReward ¶ added in v1.10.0
func (mr *MockChainMockRecorder) GetDelegateeReward(arg0, arg1 interface{}) *gomock.Call
GetDelegateeReward indicates an expected call of GetDelegateeReward.
func (*MockChainMockRecorder) GetPendingDelegatorIterator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetPendingDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
GetPendingDelegatorIterator indicates an expected call of GetPendingDelegatorIterator.
func (*MockChainMockRecorder) GetPendingStakerIterator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetPendingStakerIterator() *gomock.Call
GetPendingStakerIterator indicates an expected call of GetPendingStakerIterator.
func (*MockChainMockRecorder) GetPendingValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetPendingValidator(arg0, arg1 interface{}) *gomock.Call
GetPendingValidator indicates an expected call of GetPendingValidator.
func (*MockChainMockRecorder) GetRewardUTXOs ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetRewardUTXOs(arg0 interface{}) *gomock.Call
GetRewardUTXOs indicates an expected call of GetRewardUTXOs.
func (*MockChainMockRecorder) GetSubnetOwner ¶ added in v1.10.10
func (mr *MockChainMockRecorder) GetSubnetOwner(arg0 interface{}) *gomock.Call
GetSubnetOwner indicates an expected call of GetSubnetOwner.
func (*MockChainMockRecorder) GetSubnetTransformation ¶ added in v1.8.0
func (mr *MockChainMockRecorder) GetSubnetTransformation(arg0 interface{}) *gomock.Call
GetSubnetTransformation indicates an expected call of GetSubnetTransformation.
func (*MockChainMockRecorder) GetSubnets ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetSubnets() *gomock.Call
GetSubnets indicates an expected call of GetSubnets.
func (*MockChainMockRecorder) GetTimestamp ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetTimestamp() *gomock.Call
GetTimestamp indicates an expected call of GetTimestamp.
func (*MockChainMockRecorder) GetTx ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetTx(arg0 interface{}) *gomock.Call
GetTx indicates an expected call of GetTx.
func (*MockChainMockRecorder) GetUTXO ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetUTXO(arg0 interface{}) *gomock.Call
GetUTXO indicates an expected call of GetUTXO.
func (*MockChainMockRecorder) PutCurrentDelegator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) PutCurrentDelegator(arg0 interface{}) *gomock.Call
PutCurrentDelegator indicates an expected call of PutCurrentDelegator.
func (*MockChainMockRecorder) PutCurrentValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) PutCurrentValidator(arg0 interface{}) *gomock.Call
PutCurrentValidator indicates an expected call of PutCurrentValidator.
func (*MockChainMockRecorder) PutPendingDelegator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) PutPendingDelegator(arg0 interface{}) *gomock.Call
PutPendingDelegator indicates an expected call of PutPendingDelegator.
func (*MockChainMockRecorder) PutPendingValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) PutPendingValidator(arg0 interface{}) *gomock.Call
PutPendingValidator indicates an expected call of PutPendingValidator.
func (*MockChainMockRecorder) SetCurrentSupply ¶ added in v1.7.17
func (mr *MockChainMockRecorder) SetCurrentSupply(arg0, arg1 interface{}) *gomock.Call
SetCurrentSupply indicates an expected call of SetCurrentSupply.
func (*MockChainMockRecorder) SetDelegateeReward ¶ added in v1.10.0
func (mr *MockChainMockRecorder) SetDelegateeReward(arg0, arg1, arg2 interface{}) *gomock.Call
SetDelegateeReward indicates an expected call of SetDelegateeReward.
func (*MockChainMockRecorder) SetSubnetOwner ¶ added in v1.10.12
func (mr *MockChainMockRecorder) SetSubnetOwner(arg0, arg1 interface{}) *gomock.Call
SetSubnetOwner indicates an expected call of SetSubnetOwner.
func (*MockChainMockRecorder) SetTimestamp ¶ added in v1.7.17
func (mr *MockChainMockRecorder) SetTimestamp(arg0 interface{}) *gomock.Call
SetTimestamp indicates an expected call of SetTimestamp.
type MockDiff ¶ added in v1.7.17
type MockDiff struct {
// contains filtered or unexported fields
}
MockDiff is a mock of Diff interface.
func NewMockDiff ¶ added in v1.7.17
func NewMockDiff(ctrl *gomock.Controller) *MockDiff
NewMockDiff creates a new mock instance.
func (*MockDiff) AddRewardUTXO ¶ added in v1.7.17
AddRewardUTXO mocks base method.
func (*MockDiff) AddSubnetTransformation ¶ added in v1.8.0
AddSubnetTransformation mocks base method.
func (*MockDiff) DeleteCurrentDelegator ¶ added in v1.7.17
DeleteCurrentDelegator mocks base method.
func (*MockDiff) DeleteCurrentValidator ¶ added in v1.7.17
DeleteCurrentValidator mocks base method.
func (*MockDiff) DeletePendingDelegator ¶ added in v1.7.17
DeletePendingDelegator mocks base method.
func (*MockDiff) DeletePendingValidator ¶ added in v1.7.17
DeletePendingValidator mocks base method.
func (*MockDiff) DeleteUTXO ¶ added in v1.7.17
DeleteUTXO mocks base method.
func (*MockDiff) EXPECT ¶ added in v1.7.17
func (m *MockDiff) EXPECT() *MockDiffMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDiff) GetCurrentDelegatorIterator ¶ added in v1.7.17
func (m *MockDiff) GetCurrentDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
GetCurrentDelegatorIterator mocks base method.
func (*MockDiff) GetCurrentStakerIterator ¶ added in v1.7.17
func (m *MockDiff) GetCurrentStakerIterator() (StakerIterator, error)
GetCurrentStakerIterator mocks base method.
func (*MockDiff) GetCurrentSupply ¶ added in v1.7.17
GetCurrentSupply mocks base method.
func (*MockDiff) GetCurrentValidator ¶ added in v1.7.17
GetCurrentValidator mocks base method.
func (*MockDiff) GetDelegateeReward ¶ added in v1.10.0
GetDelegateeReward mocks base method.
func (*MockDiff) GetPendingDelegatorIterator ¶ added in v1.7.17
func (m *MockDiff) GetPendingDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
GetPendingDelegatorIterator mocks base method.
func (*MockDiff) GetPendingStakerIterator ¶ added in v1.7.17
func (m *MockDiff) GetPendingStakerIterator() (StakerIterator, error)
GetPendingStakerIterator mocks base method.
func (*MockDiff) GetPendingValidator ¶ added in v1.7.17
GetPendingValidator mocks base method.
func (*MockDiff) GetRewardUTXOs ¶ added in v1.7.17
GetRewardUTXOs mocks base method.
func (*MockDiff) GetSubnetOwner ¶ added in v1.10.10
GetSubnetOwner mocks base method.
func (*MockDiff) GetSubnetTransformation ¶ added in v1.8.0
GetSubnetTransformation mocks base method.
func (*MockDiff) GetSubnets ¶ added in v1.7.17
GetSubnets mocks base method.
func (*MockDiff) GetTimestamp ¶ added in v1.7.17
GetTimestamp mocks base method.
func (*MockDiff) PutCurrentDelegator ¶ added in v1.7.17
PutCurrentDelegator mocks base method.
func (*MockDiff) PutCurrentValidator ¶ added in v1.7.17
PutCurrentValidator mocks base method.
func (*MockDiff) PutPendingDelegator ¶ added in v1.7.17
PutPendingDelegator mocks base method.
func (*MockDiff) PutPendingValidator ¶ added in v1.7.17
PutPendingValidator mocks base method.
func (*MockDiff) SetCurrentSupply ¶ added in v1.7.17
SetCurrentSupply mocks base method.
func (*MockDiff) SetDelegateeReward ¶ added in v1.10.0
SetDelegateeReward mocks base method.
func (*MockDiff) SetSubnetOwner ¶ added in v1.10.12
SetSubnetOwner mocks base method.
func (*MockDiff) SetTimestamp ¶ added in v1.7.17
SetTimestamp mocks base method.
type MockDiffMockRecorder ¶ added in v1.7.17
type MockDiffMockRecorder struct {
// contains filtered or unexported fields
}
MockDiffMockRecorder is the mock recorder for MockDiff.
func (*MockDiffMockRecorder) AddChain ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) AddChain(arg0 interface{}) *gomock.Call
AddChain indicates an expected call of AddChain.
func (*MockDiffMockRecorder) AddRewardUTXO ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) AddRewardUTXO(arg0, arg1 interface{}) *gomock.Call
AddRewardUTXO indicates an expected call of AddRewardUTXO.
func (*MockDiffMockRecorder) AddSubnet ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) AddSubnet(arg0 interface{}) *gomock.Call
AddSubnet indicates an expected call of AddSubnet.
func (*MockDiffMockRecorder) AddSubnetTransformation ¶ added in v1.8.0
func (mr *MockDiffMockRecorder) AddSubnetTransformation(arg0 interface{}) *gomock.Call
AddSubnetTransformation indicates an expected call of AddSubnetTransformation.
func (*MockDiffMockRecorder) AddTx ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) AddTx(arg0, arg1 interface{}) *gomock.Call
AddTx indicates an expected call of AddTx.
func (*MockDiffMockRecorder) AddUTXO ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) AddUTXO(arg0 interface{}) *gomock.Call
AddUTXO indicates an expected call of AddUTXO.
func (*MockDiffMockRecorder) Apply ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) Apply(arg0 interface{}) *gomock.Call
Apply indicates an expected call of Apply.
func (*MockDiffMockRecorder) DeleteCurrentDelegator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeleteCurrentDelegator(arg0 interface{}) *gomock.Call
DeleteCurrentDelegator indicates an expected call of DeleteCurrentDelegator.
func (*MockDiffMockRecorder) DeleteCurrentValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeleteCurrentValidator(arg0 interface{}) *gomock.Call
DeleteCurrentValidator indicates an expected call of DeleteCurrentValidator.
func (*MockDiffMockRecorder) DeletePendingDelegator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeletePendingDelegator(arg0 interface{}) *gomock.Call
DeletePendingDelegator indicates an expected call of DeletePendingDelegator.
func (*MockDiffMockRecorder) DeletePendingValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeletePendingValidator(arg0 interface{}) *gomock.Call
DeletePendingValidator indicates an expected call of DeletePendingValidator.
func (*MockDiffMockRecorder) DeleteUTXO ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeleteUTXO(arg0 interface{}) *gomock.Call
DeleteUTXO indicates an expected call of DeleteUTXO.
func (*MockDiffMockRecorder) GetChains ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetChains(arg0 interface{}) *gomock.Call
GetChains indicates an expected call of GetChains.
func (*MockDiffMockRecorder) GetCurrentDelegatorIterator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetCurrentDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
GetCurrentDelegatorIterator indicates an expected call of GetCurrentDelegatorIterator.
func (*MockDiffMockRecorder) GetCurrentStakerIterator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetCurrentStakerIterator() *gomock.Call
GetCurrentStakerIterator indicates an expected call of GetCurrentStakerIterator.
func (*MockDiffMockRecorder) GetCurrentSupply ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetCurrentSupply(arg0 interface{}) *gomock.Call
GetCurrentSupply indicates an expected call of GetCurrentSupply.
func (*MockDiffMockRecorder) GetCurrentValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetCurrentValidator(arg0, arg1 interface{}) *gomock.Call
GetCurrentValidator indicates an expected call of GetCurrentValidator.
func (*MockDiffMockRecorder) GetDelegateeReward ¶ added in v1.10.0
func (mr *MockDiffMockRecorder) GetDelegateeReward(arg0, arg1 interface{}) *gomock.Call
GetDelegateeReward indicates an expected call of GetDelegateeReward.
func (*MockDiffMockRecorder) GetPendingDelegatorIterator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetPendingDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
GetPendingDelegatorIterator indicates an expected call of GetPendingDelegatorIterator.
func (*MockDiffMockRecorder) GetPendingStakerIterator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetPendingStakerIterator() *gomock.Call
GetPendingStakerIterator indicates an expected call of GetPendingStakerIterator.
func (*MockDiffMockRecorder) GetPendingValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetPendingValidator(arg0, arg1 interface{}) *gomock.Call
GetPendingValidator indicates an expected call of GetPendingValidator.
func (*MockDiffMockRecorder) GetRewardUTXOs ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetRewardUTXOs(arg0 interface{}) *gomock.Call
GetRewardUTXOs indicates an expected call of GetRewardUTXOs.
func (*MockDiffMockRecorder) GetSubnetOwner ¶ added in v1.10.10
func (mr *MockDiffMockRecorder) GetSubnetOwner(arg0 interface{}) *gomock.Call
GetSubnetOwner indicates an expected call of GetSubnetOwner.
func (*MockDiffMockRecorder) GetSubnetTransformation ¶ added in v1.8.0
func (mr *MockDiffMockRecorder) GetSubnetTransformation(arg0 interface{}) *gomock.Call
GetSubnetTransformation indicates an expected call of GetSubnetTransformation.
func (*MockDiffMockRecorder) GetSubnets ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetSubnets() *gomock.Call
GetSubnets indicates an expected call of GetSubnets.
func (*MockDiffMockRecorder) GetTimestamp ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetTimestamp() *gomock.Call
GetTimestamp indicates an expected call of GetTimestamp.
func (*MockDiffMockRecorder) GetTx ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetTx(arg0 interface{}) *gomock.Call
GetTx indicates an expected call of GetTx.
func (*MockDiffMockRecorder) GetUTXO ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetUTXO(arg0 interface{}) *gomock.Call
GetUTXO indicates an expected call of GetUTXO.
func (*MockDiffMockRecorder) PutCurrentDelegator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) PutCurrentDelegator(arg0 interface{}) *gomock.Call
PutCurrentDelegator indicates an expected call of PutCurrentDelegator.
func (*MockDiffMockRecorder) PutCurrentValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) PutCurrentValidator(arg0 interface{}) *gomock.Call
PutCurrentValidator indicates an expected call of PutCurrentValidator.
func (*MockDiffMockRecorder) PutPendingDelegator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) PutPendingDelegator(arg0 interface{}) *gomock.Call
PutPendingDelegator indicates an expected call of PutPendingDelegator.
func (*MockDiffMockRecorder) PutPendingValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) PutPendingValidator(arg0 interface{}) *gomock.Call
PutPendingValidator indicates an expected call of PutPendingValidator.
func (*MockDiffMockRecorder) SetCurrentSupply ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) SetCurrentSupply(arg0, arg1 interface{}) *gomock.Call
SetCurrentSupply indicates an expected call of SetCurrentSupply.
func (*MockDiffMockRecorder) SetDelegateeReward ¶ added in v1.10.0
func (mr *MockDiffMockRecorder) SetDelegateeReward(arg0, arg1, arg2 interface{}) *gomock.Call
SetDelegateeReward indicates an expected call of SetDelegateeReward.
func (*MockDiffMockRecorder) SetSubnetOwner ¶ added in v1.10.12
func (mr *MockDiffMockRecorder) SetSubnetOwner(arg0, arg1 interface{}) *gomock.Call
SetSubnetOwner indicates an expected call of SetSubnetOwner.
func (*MockDiffMockRecorder) SetTimestamp ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) SetTimestamp(arg0 interface{}) *gomock.Call
SetTimestamp indicates an expected call of SetTimestamp.
type MockStakerIterator ¶ added in v1.7.15
type MockStakerIterator struct {
// contains filtered or unexported fields
}
MockStakerIterator is a mock of StakerIterator interface.
func NewMockStakerIterator ¶ added in v1.7.15
func NewMockStakerIterator(ctrl *gomock.Controller) *MockStakerIterator
NewMockStakerIterator creates a new mock instance.
func (*MockStakerIterator) EXPECT ¶ added in v1.7.15
func (m *MockStakerIterator) EXPECT() *MockStakerIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStakerIterator) Next ¶ added in v1.7.15
func (m *MockStakerIterator) Next() bool
Next mocks base method.
func (*MockStakerIterator) Release ¶ added in v1.7.15
func (m *MockStakerIterator) Release()
Release mocks base method.
func (*MockStakerIterator) Value ¶ added in v1.7.15
func (m *MockStakerIterator) Value() *Staker
Value mocks base method.
type MockStakerIteratorMockRecorder ¶ added in v1.7.15
type MockStakerIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockStakerIteratorMockRecorder is the mock recorder for MockStakerIterator.
func (*MockStakerIteratorMockRecorder) Next ¶ added in v1.7.15
func (mr *MockStakerIteratorMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next.
func (*MockStakerIteratorMockRecorder) Release ¶ added in v1.7.15
func (mr *MockStakerIteratorMockRecorder) Release() *gomock.Call
Release indicates an expected call of Release.
func (*MockStakerIteratorMockRecorder) Value ¶ added in v1.7.15
func (mr *MockStakerIteratorMockRecorder) Value() *gomock.Call
Value indicates an expected call of Value.
type MockState ¶ added in v1.7.15
type MockState struct {
// contains filtered or unexported fields
}
MockState is a mock of State interface.
func NewMockState ¶ added in v1.7.15
func NewMockState(ctrl *gomock.Controller) *MockState
NewMockState creates a new mock instance.
func (*MockState) AddRewardUTXO ¶ added in v1.7.15
AddRewardUTXO mocks base method.
func (*MockState) AddStatelessBlock ¶ added in v1.7.17
AddStatelessBlock mocks base method.
func (*MockState) AddSubnetTransformation ¶ added in v1.8.0
AddSubnetTransformation mocks base method.
func (*MockState) ApplyValidatorPublicKeyDiffs ¶ added in v1.10.6
func (m *MockState) ApplyValidatorPublicKeyDiffs(arg0 context.Context, arg1 map[ids.NodeID]*validators.GetValidatorOutput, arg2, arg3 uint64) error
ApplyValidatorPublicKeyDiffs mocks base method.
func (*MockState) ApplyValidatorWeightDiffs ¶ added in v1.10.6
func (m *MockState) ApplyValidatorWeightDiffs(arg0 context.Context, arg1 map[ids.NodeID]*validators.GetValidatorOutput, arg2, arg3 uint64, arg4 ids.ID) error
ApplyValidatorWeightDiffs mocks base method.
func (*MockState) CommitBatch ¶ added in v1.7.17
CommitBatch mocks base method.
func (*MockState) DeleteCurrentDelegator ¶ added in v1.7.15
DeleteCurrentDelegator mocks base method.
func (*MockState) DeleteCurrentValidator ¶ added in v1.7.15
DeleteCurrentValidator mocks base method.
func (*MockState) DeletePendingDelegator ¶ added in v1.7.15
DeletePendingDelegator mocks base method.
func (*MockState) DeletePendingValidator ¶ added in v1.7.15
DeletePendingValidator mocks base method.
func (*MockState) DeleteUTXO ¶ added in v1.7.15
DeleteUTXO mocks base method.
func (*MockState) EXPECT ¶ added in v1.7.15
func (m *MockState) EXPECT() *MockStateMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockState) GetBlockIDAtHeight ¶ added in v1.10.8
GetBlockIDAtHeight mocks base method.
func (*MockState) GetCurrentDelegatorIterator ¶ added in v1.7.15
func (m *MockState) GetCurrentDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
GetCurrentDelegatorIterator mocks base method.
func (*MockState) GetCurrentStakerIterator ¶ added in v1.7.15
func (m *MockState) GetCurrentStakerIterator() (StakerIterator, error)
GetCurrentStakerIterator mocks base method.
func (*MockState) GetCurrentSupply ¶ added in v1.7.15
GetCurrentSupply mocks base method.
func (*MockState) GetCurrentValidator ¶ added in v1.7.15
GetCurrentValidator mocks base method.
func (*MockState) GetDelegateeReward ¶ added in v1.10.0
GetDelegateeReward mocks base method.
func (*MockState) GetLastAccepted ¶ added in v1.7.15
GetLastAccepted mocks base method.
func (*MockState) GetPendingDelegatorIterator ¶ added in v1.7.15
func (m *MockState) GetPendingDelegatorIterator(arg0 ids.ID, arg1 ids.NodeID) (StakerIterator, error)
GetPendingDelegatorIterator mocks base method.
func (*MockState) GetPendingStakerIterator ¶ added in v1.7.15
func (m *MockState) GetPendingStakerIterator() (StakerIterator, error)
GetPendingStakerIterator mocks base method.
func (*MockState) GetPendingValidator ¶ added in v1.7.15
GetPendingValidator mocks base method.
func (*MockState) GetRewardUTXOs ¶ added in v1.7.15
GetRewardUTXOs mocks base method.
func (*MockState) GetStartTime ¶ added in v1.7.15
GetStartTime mocks base method.
func (*MockState) GetStatelessBlock ¶ added in v1.7.17
GetStatelessBlock mocks base method.
func (*MockState) GetSubnetOwner ¶ added in v1.10.10
GetSubnetOwner mocks base method.
func (*MockState) GetSubnetTransformation ¶ added in v1.8.0
GetSubnetTransformation mocks base method.
func (*MockState) GetSubnets ¶ added in v1.7.15
GetSubnets mocks base method.
func (*MockState) GetTimestamp ¶ added in v1.7.15
GetTimestamp mocks base method.
func (*MockState) PruneAndIndex ¶ added in v1.10.8
PruneAndIndex mocks base method.
func (*MockState) PutCurrentDelegator ¶ added in v1.7.15
PutCurrentDelegator mocks base method.
func (*MockState) PutCurrentValidator ¶ added in v1.7.15
PutCurrentValidator mocks base method.
func (*MockState) PutPendingDelegator ¶ added in v1.7.15
PutPendingDelegator mocks base method.
func (*MockState) PutPendingValidator ¶ added in v1.7.15
PutPendingValidator mocks base method.
func (*MockState) SetCurrentSupply ¶ added in v1.7.15
SetCurrentSupply mocks base method.
func (*MockState) SetDelegateeReward ¶ added in v1.10.0
SetDelegateeReward mocks base method.
func (*MockState) SetLastAccepted ¶ added in v1.7.15
SetLastAccepted mocks base method.
func (*MockState) SetSubnetOwner ¶ added in v1.10.12
SetSubnetOwner mocks base method.
func (*MockState) SetTimestamp ¶ added in v1.7.15
SetTimestamp mocks base method.
func (*MockState) SetUptime ¶ added in v1.7.15
func (m *MockState) SetUptime(arg0 ids.NodeID, arg1 ids.ID, arg2 time.Duration, arg3 time.Time) error
SetUptime mocks base method.
func (*MockState) ShouldPrune ¶ added in v1.10.8
ShouldPrune mocks base method.
type MockStateMockRecorder ¶ added in v1.7.15
type MockStateMockRecorder struct {
// contains filtered or unexported fields
}
MockStateMockRecorder is the mock recorder for MockState.
func (*MockStateMockRecorder) Abort ¶ added in v1.7.17
func (mr *MockStateMockRecorder) Abort() *gomock.Call
Abort indicates an expected call of Abort.
func (*MockStateMockRecorder) AddChain ¶ added in v1.7.15
func (mr *MockStateMockRecorder) AddChain(arg0 interface{}) *gomock.Call
AddChain indicates an expected call of AddChain.
func (*MockStateMockRecorder) AddRewardUTXO ¶ added in v1.7.15
func (mr *MockStateMockRecorder) AddRewardUTXO(arg0, arg1 interface{}) *gomock.Call
AddRewardUTXO indicates an expected call of AddRewardUTXO.
func (*MockStateMockRecorder) AddStatelessBlock ¶ added in v1.7.17
func (mr *MockStateMockRecorder) AddStatelessBlock(arg0 interface{}) *gomock.Call
AddStatelessBlock indicates an expected call of AddStatelessBlock.
func (*MockStateMockRecorder) AddSubnet ¶ added in v1.7.15
func (mr *MockStateMockRecorder) AddSubnet(arg0 interface{}) *gomock.Call
AddSubnet indicates an expected call of AddSubnet.
func (*MockStateMockRecorder) AddSubnetTransformation ¶ added in v1.8.0
func (mr *MockStateMockRecorder) AddSubnetTransformation(arg0 interface{}) *gomock.Call
AddSubnetTransformation indicates an expected call of AddSubnetTransformation.
func (*MockStateMockRecorder) AddTx ¶ added in v1.7.15
func (mr *MockStateMockRecorder) AddTx(arg0, arg1 interface{}) *gomock.Call
AddTx indicates an expected call of AddTx.
func (*MockStateMockRecorder) AddUTXO ¶ added in v1.7.15
func (mr *MockStateMockRecorder) AddUTXO(arg0 interface{}) *gomock.Call
AddUTXO indicates an expected call of AddUTXO.
func (*MockStateMockRecorder) ApplyValidatorPublicKeyDiffs ¶ added in v1.10.6
func (mr *MockStateMockRecorder) ApplyValidatorPublicKeyDiffs(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
ApplyValidatorPublicKeyDiffs indicates an expected call of ApplyValidatorPublicKeyDiffs.
func (*MockStateMockRecorder) ApplyValidatorWeightDiffs ¶ added in v1.10.6
func (mr *MockStateMockRecorder) ApplyValidatorWeightDiffs(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
ApplyValidatorWeightDiffs indicates an expected call of ApplyValidatorWeightDiffs.
func (*MockStateMockRecorder) Checksum ¶ added in v1.10.4
func (mr *MockStateMockRecorder) Checksum() *gomock.Call
Checksum indicates an expected call of Checksum.
func (*MockStateMockRecorder) Close ¶ added in v1.7.15
func (mr *MockStateMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockStateMockRecorder) Commit ¶ added in v1.7.17
func (mr *MockStateMockRecorder) Commit() *gomock.Call
Commit indicates an expected call of Commit.
func (*MockStateMockRecorder) CommitBatch ¶ added in v1.7.17
func (mr *MockStateMockRecorder) CommitBatch() *gomock.Call
CommitBatch indicates an expected call of CommitBatch.
func (*MockStateMockRecorder) DeleteCurrentDelegator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) DeleteCurrentDelegator(arg0 interface{}) *gomock.Call
DeleteCurrentDelegator indicates an expected call of DeleteCurrentDelegator.
func (*MockStateMockRecorder) DeleteCurrentValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) DeleteCurrentValidator(arg0 interface{}) *gomock.Call
DeleteCurrentValidator indicates an expected call of DeleteCurrentValidator.
func (*MockStateMockRecorder) DeletePendingDelegator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) DeletePendingDelegator(arg0 interface{}) *gomock.Call
DeletePendingDelegator indicates an expected call of DeletePendingDelegator.
func (*MockStateMockRecorder) DeletePendingValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) DeletePendingValidator(arg0 interface{}) *gomock.Call
DeletePendingValidator indicates an expected call of DeletePendingValidator.
func (*MockStateMockRecorder) DeleteUTXO ¶ added in v1.7.15
func (mr *MockStateMockRecorder) DeleteUTXO(arg0 interface{}) *gomock.Call
DeleteUTXO indicates an expected call of DeleteUTXO.
func (*MockStateMockRecorder) GetBlockIDAtHeight ¶ added in v1.10.8
func (mr *MockStateMockRecorder) GetBlockIDAtHeight(arg0 interface{}) *gomock.Call
GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.
func (*MockStateMockRecorder) GetChains ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetChains(arg0 interface{}) *gomock.Call
GetChains indicates an expected call of GetChains.
func (*MockStateMockRecorder) GetCurrentDelegatorIterator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetCurrentDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
GetCurrentDelegatorIterator indicates an expected call of GetCurrentDelegatorIterator.
func (*MockStateMockRecorder) GetCurrentStakerIterator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetCurrentStakerIterator() *gomock.Call
GetCurrentStakerIterator indicates an expected call of GetCurrentStakerIterator.
func (*MockStateMockRecorder) GetCurrentSupply ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetCurrentSupply(arg0 interface{}) *gomock.Call
GetCurrentSupply indicates an expected call of GetCurrentSupply.
func (*MockStateMockRecorder) GetCurrentValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetCurrentValidator(arg0, arg1 interface{}) *gomock.Call
GetCurrentValidator indicates an expected call of GetCurrentValidator.
func (*MockStateMockRecorder) GetDelegateeReward ¶ added in v1.10.0
func (mr *MockStateMockRecorder) GetDelegateeReward(arg0, arg1 interface{}) *gomock.Call
GetDelegateeReward indicates an expected call of GetDelegateeReward.
func (*MockStateMockRecorder) GetLastAccepted ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetLastAccepted() *gomock.Call
GetLastAccepted indicates an expected call of GetLastAccepted.
func (*MockStateMockRecorder) GetPendingDelegatorIterator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetPendingDelegatorIterator(arg0, arg1 interface{}) *gomock.Call
GetPendingDelegatorIterator indicates an expected call of GetPendingDelegatorIterator.
func (*MockStateMockRecorder) GetPendingStakerIterator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetPendingStakerIterator() *gomock.Call
GetPendingStakerIterator indicates an expected call of GetPendingStakerIterator.
func (*MockStateMockRecorder) GetPendingValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetPendingValidator(arg0, arg1 interface{}) *gomock.Call
GetPendingValidator indicates an expected call of GetPendingValidator.
func (*MockStateMockRecorder) GetRewardUTXOs ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetRewardUTXOs(arg0 interface{}) *gomock.Call
GetRewardUTXOs indicates an expected call of GetRewardUTXOs.
func (*MockStateMockRecorder) GetStartTime ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetStartTime(arg0, arg1 interface{}) *gomock.Call
GetStartTime indicates an expected call of GetStartTime.
func (*MockStateMockRecorder) GetStatelessBlock ¶ added in v1.7.17
func (mr *MockStateMockRecorder) GetStatelessBlock(arg0 interface{}) *gomock.Call
GetStatelessBlock indicates an expected call of GetStatelessBlock.
func (*MockStateMockRecorder) GetSubnetOwner ¶ added in v1.10.10
func (mr *MockStateMockRecorder) GetSubnetOwner(arg0 interface{}) *gomock.Call
GetSubnetOwner indicates an expected call of GetSubnetOwner.
func (*MockStateMockRecorder) GetSubnetTransformation ¶ added in v1.8.0
func (mr *MockStateMockRecorder) GetSubnetTransformation(arg0 interface{}) *gomock.Call
GetSubnetTransformation indicates an expected call of GetSubnetTransformation.
func (*MockStateMockRecorder) GetSubnets ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetSubnets() *gomock.Call
GetSubnets indicates an expected call of GetSubnets.
func (*MockStateMockRecorder) GetTimestamp ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetTimestamp() *gomock.Call
GetTimestamp indicates an expected call of GetTimestamp.
func (*MockStateMockRecorder) GetTx ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetTx(arg0 interface{}) *gomock.Call
GetTx indicates an expected call of GetTx.
func (*MockStateMockRecorder) GetUTXO ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetUTXO(arg0 interface{}) *gomock.Call
GetUTXO indicates an expected call of GetUTXO.
func (*MockStateMockRecorder) GetUptime ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetUptime(arg0, arg1 interface{}) *gomock.Call
GetUptime indicates an expected call of GetUptime.
func (*MockStateMockRecorder) PruneAndIndex ¶ added in v1.10.8
func (mr *MockStateMockRecorder) PruneAndIndex(arg0, arg1 interface{}) *gomock.Call
PruneAndIndex indicates an expected call of PruneAndIndex.
func (*MockStateMockRecorder) PutCurrentDelegator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) PutCurrentDelegator(arg0 interface{}) *gomock.Call
PutCurrentDelegator indicates an expected call of PutCurrentDelegator.
func (*MockStateMockRecorder) PutCurrentValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) PutCurrentValidator(arg0 interface{}) *gomock.Call
PutCurrentValidator indicates an expected call of PutCurrentValidator.
func (*MockStateMockRecorder) PutPendingDelegator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) PutPendingDelegator(arg0 interface{}) *gomock.Call
PutPendingDelegator indicates an expected call of PutPendingDelegator.
func (*MockStateMockRecorder) PutPendingValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) PutPendingValidator(arg0 interface{}) *gomock.Call
PutPendingValidator indicates an expected call of PutPendingValidator.
func (*MockStateMockRecorder) SetCurrentSupply ¶ added in v1.7.15
func (mr *MockStateMockRecorder) SetCurrentSupply(arg0, arg1 interface{}) *gomock.Call
SetCurrentSupply indicates an expected call of SetCurrentSupply.
func (*MockStateMockRecorder) SetDelegateeReward ¶ added in v1.10.0
func (mr *MockStateMockRecorder) SetDelegateeReward(arg0, arg1, arg2 interface{}) *gomock.Call
SetDelegateeReward indicates an expected call of SetDelegateeReward.
func (*MockStateMockRecorder) SetHeight ¶ added in v1.7.17
func (mr *MockStateMockRecorder) SetHeight(arg0 interface{}) *gomock.Call
SetHeight indicates an expected call of SetHeight.
func (*MockStateMockRecorder) SetLastAccepted ¶ added in v1.7.15
func (mr *MockStateMockRecorder) SetLastAccepted(arg0 interface{}) *gomock.Call
SetLastAccepted indicates an expected call of SetLastAccepted.
func (*MockStateMockRecorder) SetSubnetOwner ¶ added in v1.10.12
func (mr *MockStateMockRecorder) SetSubnetOwner(arg0, arg1 interface{}) *gomock.Call
SetSubnetOwner indicates an expected call of SetSubnetOwner.
func (*MockStateMockRecorder) SetTimestamp ¶ added in v1.7.15
func (mr *MockStateMockRecorder) SetTimestamp(arg0 interface{}) *gomock.Call
SetTimestamp indicates an expected call of SetTimestamp.
func (*MockStateMockRecorder) SetUptime ¶ added in v1.7.15
func (mr *MockStateMockRecorder) SetUptime(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
SetUptime indicates an expected call of SetUptime.
func (*MockStateMockRecorder) ShouldPrune ¶ added in v1.10.8
func (mr *MockStateMockRecorder) ShouldPrune() *gomock.Call
ShouldPrune indicates an expected call of ShouldPrune.
func (*MockStateMockRecorder) UTXOIDs ¶ added in v1.7.15
func (mr *MockStateMockRecorder) UTXOIDs(arg0, arg1, arg2 interface{}) *gomock.Call
UTXOIDs indicates an expected call of UTXOIDs.
type MockVersions ¶ added in v1.7.15
type MockVersions struct {
// contains filtered or unexported fields
}
MockVersions is a mock of Versions interface.
func NewMockVersions ¶ added in v1.7.15
func NewMockVersions(ctrl *gomock.Controller) *MockVersions
NewMockVersions creates a new mock instance.
func (*MockVersions) EXPECT ¶ added in v1.7.15
func (m *MockVersions) EXPECT() *MockVersionsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockVersionsMockRecorder ¶ added in v1.7.15
type MockVersionsMockRecorder struct {
// contains filtered or unexported fields
}
MockVersionsMockRecorder is the mock recorder for MockVersions.
func (*MockVersionsMockRecorder) GetState ¶ added in v1.7.15
func (mr *MockVersionsMockRecorder) GetState(arg0 interface{}) *gomock.Call
GetState indicates an expected call of GetState.
type PendingStakers ¶
type PendingStakers interface { // GetPendingValidator returns the Staker describing the validator on // [subnetID] with [nodeID]. If the validator does not exist, // [database.ErrNotFound] is returned. GetPendingValidator(subnetID ids.ID, nodeID ids.NodeID) (*Staker, error) // PutPendingValidator adds the [staker] describing a validator to the // staker set. PutPendingValidator(staker *Staker) // DeletePendingValidator removes the [staker] describing a validator from // the staker set. DeletePendingValidator(staker *Staker) // GetPendingDelegatorIterator returns the delegators associated with the // validator on [subnetID] with [nodeID]. Delegators are sorted by their // removal from pending staker set. GetPendingDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (StakerIterator, error) // PutPendingDelegator adds the [staker] describing a delegator to the // staker set. PutPendingDelegator(staker *Staker) // DeletePendingDelegator removes the [staker] describing a delegator from // the staker set. DeletePendingDelegator(staker *Staker) // GetPendingStakerIterator returns stakers in order of their removal from // the pending staker set. GetPendingStakerIterator() (StakerIterator, error) }
type Staker ¶ added in v1.7.15
type Staker struct { TxID ids.ID NodeID ids.NodeID PublicKey *bls.PublicKey SubnetID ids.ID Weight uint64 StartTime time.Time EndTime time.Time PotentialReward uint64 // NextTime is the next time this staker will be moved from a validator set. // If the staker is in the pending validator set, NextTime will equal // StartTime. If the staker is in the current validator set, NextTime will // equal EndTime. NextTime time.Time // Priority specifies how to break ties between stakers with the same // NextTime. This ensures that stakers created by the same transaction type // are grouped together. The ordering of these groups is documented in // [priorities.go] and depends on if the stakers are in the pending or // current validator set. Priority txs.Priority }
Staker contains all information required to represent a validator or delegator in the current and pending validator sets. Invariant: Staker's size is bounded to prevent OOM DoS attacks.
func NewCurrentStaker ¶ added in v1.8.0
func NewPendingStaker ¶ added in v1.8.0
func (*Staker) Less ¶ added in v1.7.15
A *Staker is considered to be less than another *Staker when:
- If its NextTime is before the other's.
- If the NextTimes are the same, the *Staker with the lesser priority is the lesser one.
- If the priorities are also the same, the one with the lesser txID is lesser.
type StakerDiffIterator ¶ added in v1.7.15
type StakerDiffIterator interface { Next() bool // Returns: // - The staker that is changing // - True if the staker is being added to the current staker set, false if // the staker is being removed from the current staker set Value() (*Staker, bool) Release() }
StakerDiffIterator is an iterator that iterates over the events that will be performed on the current staker set.
There are two event types affecting current staker set, removal of an existing staker and addition of a new staker from the pending set.
The ordering of operations is:
- Staker operations are performed in order of their [NextTime].
- If operations have the same [NextTime], stakers are first added to the current staker set, then removed.
- Further ties are broken by *Staker.Less(), returning the lesser staker first.
func NewStakerDiffIterator ¶ added in v1.7.15
func NewStakerDiffIterator(currentIterator, pendingIterator StakerIterator) StakerDiffIterator
type StakerIterator ¶ added in v1.7.15
type StakerIterator interface { // Next attempts to move the iterator to the next staker. It returns false // once there are no more stakers to return. Next() bool // Value returns the current staker. Value should only be called after a // call to Next which returned true. Value() *Staker // Release any resources associated with the iterator. This must be called // after the interator is no longer needed. Release() }
StakerIterator defines an interface for iterating over a set of stakers.
var EmptyIterator StakerIterator = emptyIterator{}
EmptyIterator contains no stakers.
func NewMaskedIterator ¶ added in v1.7.15
func NewMaskedIterator(parentIterator StakerIterator, maskedStakers map[ids.ID]*Staker) StakerIterator
NewMaskedIterator returns a new iterator that skips the stakers in [parentIterator] that are present in [maskedStakers].
func NewMergedIterator ¶ added in v1.7.15
func NewMergedIterator(stakers ...StakerIterator) StakerIterator
Returns an iterator that returns all of the elements of [stakers] in order.
func NewTreeIterator ¶ added in v1.7.15
func NewTreeIterator(tree *btree.BTreeG[*Staker]) StakerIterator
NewTreeIterator returns a new iterator of the stakers in [tree] in ascending order. Note that it isn't safe to modify [tree] while iterating over it.
type Stakers ¶
type Stakers interface { CurrentStakers PendingStakers }
type State ¶
type State interface { Chain uptime.State avax.UTXOReader GetLastAccepted() ids.ID SetLastAccepted(blkID ids.ID) GetStatelessBlock(blockID ids.ID) (block.Block, error) // Invariant: [block] is an accepted block. AddStatelessBlock(block block.Block) GetBlockIDAtHeight(height uint64) (ids.ID, error) // ApplyValidatorWeightDiffs iterates from [startHeight] towards the genesis // block until it has applied all of the diffs up to and including // [endHeight]. Applying the diffs modifies [validators]. // // Invariant: If attempting to generate the validator set for // [endHeight - 1], [validators] must initially contain the validator // weights for [startHeight]. // // Note: Because this function iterates towards the genesis, [startHeight] // will typically be greater than or equal to [endHeight]. If [startHeight] // is less than [endHeight], no diffs will be applied. ApplyValidatorWeightDiffs( ctx context.Context, validators map[ids.NodeID]*validators.GetValidatorOutput, startHeight uint64, endHeight uint64, subnetID ids.ID, ) error // ApplyValidatorPublicKeyDiffs iterates from [startHeight] towards the // genesis block until it has applied all of the diffs up to and including // [endHeight]. Applying the diffs modifies [validators]. // // Invariant: If attempting to generate the validator set for // [endHeight - 1], [validators] must initially contain the validator // weights for [startHeight]. // // Note: Because this function iterates towards the genesis, [startHeight] // will typically be greater than or equal to [endHeight]. If [startHeight] // is less than [endHeight], no diffs will be applied. ApplyValidatorPublicKeyDiffs( ctx context.Context, validators map[ids.NodeID]*validators.GetValidatorOutput, startHeight uint64, endHeight uint64, ) error SetHeight(height uint64) // Discard uncommitted changes to the database. Abort() // Returns if the state should be pruned and indexed to remove rejected // blocks and generate the block height index. // // TODO: Remove after v1.11.x is activated ShouldPrune() (bool, error) // Removes rejected blocks from disk and indexes accepted blocks by height. This // function supports being (and is recommended to be) called asynchronously. // // TODO: Remove after v1.11.x is activated PruneAndIndex(sync.Locker, logging.Logger) error // Commit changes to the base database. Commit() error // Returns a batch of unwritten changes that, when written, will commit all // pending changes to the base database. CommitBatch() (database.Batch, error) Checksum() ids.ID Close() error }
func New ¶
func New( db database.Database, genesisBytes []byte, metricsReg prometheus.Registerer, validators validators.Manager, execCfg *config.ExecutionConfig, ctx *snow.Context, metrics metrics.Metrics, rewards reward.Calculator, ) (State, error)