Documentation ¶
Overview ¶
Package state is a generated GoMock package.
Package state is a generated GoMock package.
Package state is a generated GoMock package.
Index ¶
- Constants
- Variables
- func GetNextStakerChangeTime(config validatorfee.Config, state Chain, defaultTime time.Time) (time.Time, error)
- func NewStaticFeeCalculator(config *config.Config, timestamp time.Time) txfee.Calculator
- func NextBlockTime(config validatorfee.Config, state Chain, clk *mockable.Clock) (time.Time, bool, error)
- func PickFeeCalculator(config *config.Config, state Chain) txfee.Calculator
- type Chain
- type CurrentStakers
- type Diff
- type Expiry
- type ExpiryEntry
- type MockChain
- func (m *MockChain) AddChain(createChainTx *txs.Tx)
- func (m *MockChain) AddRewardUTXO(txID ids.ID, utxo *avax.UTXO)
- func (m *MockChain) AddSubnet(subnetID ids.ID)
- func (m *MockChain) AddSubnetTransformation(transformSubnetTx *txs.Tx)
- func (m *MockChain) AddTx(tx *txs.Tx, status status.Status)
- func (m *MockChain) AddUTXO(utxo *avax.UTXO)
- func (m *MockChain) DeleteCurrentDelegator(staker *Staker)
- func (m *MockChain) DeleteCurrentValidator(staker *Staker)
- func (m *MockChain) DeleteExpiry(arg0 ExpiryEntry)
- func (m *MockChain) DeletePendingDelegator(staker *Staker)
- func (m *MockChain) DeletePendingValidator(staker *Staker)
- func (m *MockChain) DeleteUTXO(utxoID ids.ID)
- func (m *MockChain) EXPECT() *MockChainMockRecorder
- func (m *MockChain) GetAccruedFees() uint64
- func (m *MockChain) GetActiveSubnetOnlyValidatorsIterator() (iterator.Iterator[SubnetOnlyValidator], error)
- func (m *MockChain) GetCurrentDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
- func (m *MockChain) GetCurrentStakerIterator() (iterator.Iterator[*Staker], error)
- func (m *MockChain) GetCurrentSupply(subnetID ids.ID) (uint64, error)
- func (m *MockChain) GetCurrentValidator(subnetID ids.ID, nodeID ids.NodeID) (*Staker, error)
- func (m *MockChain) GetDelegateeReward(subnetID ids.ID, nodeID ids.NodeID) (uint64, error)
- func (m *MockChain) GetExpiryIterator() (iterator.Iterator[ExpiryEntry], error)
- func (m *MockChain) GetFeeState() gas.State
- func (m *MockChain) GetPendingDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
- func (m *MockChain) GetPendingStakerIterator() (iterator.Iterator[*Staker], error)
- func (m *MockChain) GetPendingValidator(subnetID ids.ID, nodeID ids.NodeID) (*Staker, error)
- func (m *MockChain) GetSoVExcess() gas.Gas
- func (m *MockChain) GetSubnetConversion(subnetID ids.ID) (ids.ID, ids.ID, []byte, error)
- func (m *MockChain) GetSubnetOnlyValidator(validationID ids.ID) (SubnetOnlyValidator, error)
- func (m *MockChain) GetSubnetOwner(subnetID ids.ID) (fx.Owner, error)
- func (m *MockChain) GetSubnetTransformation(subnetID ids.ID) (*txs.Tx, error)
- func (m *MockChain) GetTimestamp() time.Time
- func (m *MockChain) GetTx(txID ids.ID) (*txs.Tx, status.Status, error)
- func (m *MockChain) GetUTXO(utxoID ids.ID) (*avax.UTXO, error)
- func (m *MockChain) HasExpiry(arg0 ExpiryEntry) (bool, error)
- func (m *MockChain) HasSubnetOnlyValidator(subnetID ids.ID, nodeID ids.NodeID) (bool, error)
- func (m *MockChain) NumActiveSubnetOnlyValidators() int
- func (m *MockChain) PutCurrentDelegator(staker *Staker)
- func (m *MockChain) PutCurrentValidator(staker *Staker) error
- func (m *MockChain) PutExpiry(arg0 ExpiryEntry)
- func (m *MockChain) PutPendingDelegator(staker *Staker)
- func (m *MockChain) PutPendingValidator(staker *Staker) error
- func (m *MockChain) PutSubnetOnlyValidator(sov SubnetOnlyValidator) error
- func (m *MockChain) SetAccruedFees(f uint64)
- func (m *MockChain) SetCurrentSupply(subnetID ids.ID, cs uint64)
- func (m *MockChain) SetDelegateeReward(subnetID ids.ID, nodeID ids.NodeID, amount uint64) error
- func (m *MockChain) SetFeeState(f gas.State)
- func (m *MockChain) SetSoVExcess(e gas.Gas)
- func (m *MockChain) SetSubnetConversion(subnetID, conversionID, chainID ids.ID, addr []byte)
- func (m *MockChain) SetSubnetOwner(subnetID ids.ID, owner fx.Owner)
- func (m *MockChain) SetTimestamp(tm time.Time)
- func (m *MockChain) WeightOfSubnetOnlyValidators(subnetID ids.ID) (uint64, error)
- type MockChainMockRecorder
- func (mr *MockChainMockRecorder) AddChain(createChainTx any) *gomock.Call
- func (mr *MockChainMockRecorder) AddRewardUTXO(txID, utxo any) *gomock.Call
- func (mr *MockChainMockRecorder) AddSubnet(subnetID any) *gomock.Call
- func (mr *MockChainMockRecorder) AddSubnetTransformation(transformSubnetTx any) *gomock.Call
- func (mr *MockChainMockRecorder) AddTx(tx, status any) *gomock.Call
- func (mr *MockChainMockRecorder) AddUTXO(utxo any) *gomock.Call
- func (mr *MockChainMockRecorder) DeleteCurrentDelegator(staker any) *gomock.Call
- func (mr *MockChainMockRecorder) DeleteCurrentValidator(staker any) *gomock.Call
- func (mr *MockChainMockRecorder) DeleteExpiry(arg0 any) *gomock.Call
- func (mr *MockChainMockRecorder) DeletePendingDelegator(staker any) *gomock.Call
- func (mr *MockChainMockRecorder) DeletePendingValidator(staker any) *gomock.Call
- func (mr *MockChainMockRecorder) DeleteUTXO(utxoID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetAccruedFees() *gomock.Call
- func (mr *MockChainMockRecorder) GetActiveSubnetOnlyValidatorsIterator() *gomock.Call
- func (mr *MockChainMockRecorder) GetCurrentDelegatorIterator(subnetID, nodeID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetCurrentStakerIterator() *gomock.Call
- func (mr *MockChainMockRecorder) GetCurrentSupply(subnetID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetCurrentValidator(subnetID, nodeID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetDelegateeReward(subnetID, nodeID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetExpiryIterator() *gomock.Call
- func (mr *MockChainMockRecorder) GetFeeState() *gomock.Call
- func (mr *MockChainMockRecorder) GetPendingDelegatorIterator(subnetID, nodeID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetPendingStakerIterator() *gomock.Call
- func (mr *MockChainMockRecorder) GetPendingValidator(subnetID, nodeID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetSoVExcess() *gomock.Call
- func (mr *MockChainMockRecorder) GetSubnetConversion(subnetID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetSubnetOnlyValidator(validationID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetSubnetOwner(subnetID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetSubnetTransformation(subnetID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetTimestamp() *gomock.Call
- func (mr *MockChainMockRecorder) GetTx(txID any) *gomock.Call
- func (mr *MockChainMockRecorder) GetUTXO(utxoID any) *gomock.Call
- func (mr *MockChainMockRecorder) HasExpiry(arg0 any) *gomock.Call
- func (mr *MockChainMockRecorder) HasSubnetOnlyValidator(subnetID, nodeID any) *gomock.Call
- func (mr *MockChainMockRecorder) NumActiveSubnetOnlyValidators() *gomock.Call
- func (mr *MockChainMockRecorder) PutCurrentDelegator(staker any) *gomock.Call
- func (mr *MockChainMockRecorder) PutCurrentValidator(staker any) *gomock.Call
- func (mr *MockChainMockRecorder) PutExpiry(arg0 any) *gomock.Call
- func (mr *MockChainMockRecorder) PutPendingDelegator(staker any) *gomock.Call
- func (mr *MockChainMockRecorder) PutPendingValidator(staker any) *gomock.Call
- func (mr *MockChainMockRecorder) PutSubnetOnlyValidator(sov any) *gomock.Call
- func (mr *MockChainMockRecorder) SetAccruedFees(f any) *gomock.Call
- func (mr *MockChainMockRecorder) SetCurrentSupply(subnetID, cs any) *gomock.Call
- func (mr *MockChainMockRecorder) SetDelegateeReward(subnetID, nodeID, amount any) *gomock.Call
- func (mr *MockChainMockRecorder) SetFeeState(f any) *gomock.Call
- func (mr *MockChainMockRecorder) SetSoVExcess(e any) *gomock.Call
- func (mr *MockChainMockRecorder) SetSubnetConversion(subnetID, conversionID, chainID, addr any) *gomock.Call
- func (mr *MockChainMockRecorder) SetSubnetOwner(subnetID, owner any) *gomock.Call
- func (mr *MockChainMockRecorder) SetTimestamp(tm any) *gomock.Call
- func (mr *MockChainMockRecorder) WeightOfSubnetOnlyValidators(subnetID any) *gomock.Call
- type MockDiff
- func (m *MockDiff) AddChain(createChainTx *txs.Tx)
- func (m *MockDiff) AddRewardUTXO(txID ids.ID, utxo *avax.UTXO)
- func (m *MockDiff) AddSubnet(subnetID ids.ID)
- func (m *MockDiff) AddSubnetTransformation(transformSubnetTx *txs.Tx)
- func (m *MockDiff) AddTx(tx *txs.Tx, status status.Status)
- func (m *MockDiff) AddUTXO(utxo *avax.UTXO)
- func (m *MockDiff) Apply(arg0 Chain) error
- func (m *MockDiff) DeleteCurrentDelegator(staker *Staker)
- func (m *MockDiff) DeleteCurrentValidator(staker *Staker)
- func (m *MockDiff) DeleteExpiry(arg0 ExpiryEntry)
- func (m *MockDiff) DeletePendingDelegator(staker *Staker)
- func (m *MockDiff) DeletePendingValidator(staker *Staker)
- func (m *MockDiff) DeleteUTXO(utxoID ids.ID)
- func (m *MockDiff) EXPECT() *MockDiffMockRecorder
- func (m *MockDiff) GetAccruedFees() uint64
- func (m *MockDiff) GetActiveSubnetOnlyValidatorsIterator() (iterator.Iterator[SubnetOnlyValidator], error)
- func (m *MockDiff) GetCurrentDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
- func (m *MockDiff) GetCurrentStakerIterator() (iterator.Iterator[*Staker], error)
- func (m *MockDiff) GetCurrentSupply(subnetID ids.ID) (uint64, error)
- func (m *MockDiff) GetCurrentValidator(subnetID ids.ID, nodeID ids.NodeID) (*Staker, error)
- func (m *MockDiff) GetDelegateeReward(subnetID ids.ID, nodeID ids.NodeID) (uint64, error)
- func (m *MockDiff) GetExpiryIterator() (iterator.Iterator[ExpiryEntry], error)
- func (m *MockDiff) GetFeeState() gas.State
- func (m *MockDiff) GetPendingDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
- func (m *MockDiff) GetPendingStakerIterator() (iterator.Iterator[*Staker], error)
- func (m *MockDiff) GetPendingValidator(subnetID ids.ID, nodeID ids.NodeID) (*Staker, error)
- func (m *MockDiff) GetSoVExcess() gas.Gas
- func (m *MockDiff) GetSubnetConversion(subnetID ids.ID) (ids.ID, ids.ID, []byte, error)
- func (m *MockDiff) GetSubnetOnlyValidator(validationID ids.ID) (SubnetOnlyValidator, error)
- func (m *MockDiff) GetSubnetOwner(subnetID ids.ID) (fx.Owner, error)
- func (m *MockDiff) GetSubnetTransformation(subnetID ids.ID) (*txs.Tx, error)
- func (m *MockDiff) GetTimestamp() time.Time
- func (m *MockDiff) GetTx(txID ids.ID) (*txs.Tx, status.Status, error)
- func (m *MockDiff) GetUTXO(utxoID ids.ID) (*avax.UTXO, error)
- func (m *MockDiff) HasExpiry(arg0 ExpiryEntry) (bool, error)
- func (m *MockDiff) HasSubnetOnlyValidator(subnetID ids.ID, nodeID ids.NodeID) (bool, error)
- func (m *MockDiff) NumActiveSubnetOnlyValidators() int
- func (m *MockDiff) PutCurrentDelegator(staker *Staker)
- func (m *MockDiff) PutCurrentValidator(staker *Staker) error
- func (m *MockDiff) PutExpiry(arg0 ExpiryEntry)
- func (m *MockDiff) PutPendingDelegator(staker *Staker)
- func (m *MockDiff) PutPendingValidator(staker *Staker) error
- func (m *MockDiff) PutSubnetOnlyValidator(sov SubnetOnlyValidator) error
- func (m *MockDiff) SetAccruedFees(f uint64)
- func (m *MockDiff) SetCurrentSupply(subnetID ids.ID, cs uint64)
- func (m *MockDiff) SetDelegateeReward(subnetID ids.ID, nodeID ids.NodeID, amount uint64) error
- func (m *MockDiff) SetFeeState(f gas.State)
- func (m *MockDiff) SetSoVExcess(e gas.Gas)
- func (m *MockDiff) SetSubnetConversion(subnetID, conversionID, chainID ids.ID, addr []byte)
- func (m *MockDiff) SetSubnetOwner(subnetID ids.ID, owner fx.Owner)
- func (m *MockDiff) SetTimestamp(tm time.Time)
- func (m *MockDiff) WeightOfSubnetOnlyValidators(subnetID ids.ID) (uint64, error)
- type MockDiffMockRecorder
- func (mr *MockDiffMockRecorder) AddChain(createChainTx any) *gomock.Call
- func (mr *MockDiffMockRecorder) AddRewardUTXO(txID, utxo any) *gomock.Call
- func (mr *MockDiffMockRecorder) AddSubnet(subnetID any) *gomock.Call
- func (mr *MockDiffMockRecorder) AddSubnetTransformation(transformSubnetTx any) *gomock.Call
- func (mr *MockDiffMockRecorder) AddTx(tx, status any) *gomock.Call
- func (mr *MockDiffMockRecorder) AddUTXO(utxo any) *gomock.Call
- func (mr *MockDiffMockRecorder) Apply(arg0 any) *gomock.Call
- func (mr *MockDiffMockRecorder) DeleteCurrentDelegator(staker any) *gomock.Call
- func (mr *MockDiffMockRecorder) DeleteCurrentValidator(staker any) *gomock.Call
- func (mr *MockDiffMockRecorder) DeleteExpiry(arg0 any) *gomock.Call
- func (mr *MockDiffMockRecorder) DeletePendingDelegator(staker any) *gomock.Call
- func (mr *MockDiffMockRecorder) DeletePendingValidator(staker any) *gomock.Call
- func (mr *MockDiffMockRecorder) DeleteUTXO(utxoID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetAccruedFees() *gomock.Call
- func (mr *MockDiffMockRecorder) GetActiveSubnetOnlyValidatorsIterator() *gomock.Call
- func (mr *MockDiffMockRecorder) GetCurrentDelegatorIterator(subnetID, nodeID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetCurrentStakerIterator() *gomock.Call
- func (mr *MockDiffMockRecorder) GetCurrentSupply(subnetID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetCurrentValidator(subnetID, nodeID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetDelegateeReward(subnetID, nodeID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetExpiryIterator() *gomock.Call
- func (mr *MockDiffMockRecorder) GetFeeState() *gomock.Call
- func (mr *MockDiffMockRecorder) GetPendingDelegatorIterator(subnetID, nodeID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetPendingStakerIterator() *gomock.Call
- func (mr *MockDiffMockRecorder) GetPendingValidator(subnetID, nodeID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetSoVExcess() *gomock.Call
- func (mr *MockDiffMockRecorder) GetSubnetConversion(subnetID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetSubnetOnlyValidator(validationID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetSubnetOwner(subnetID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetSubnetTransformation(subnetID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetTimestamp() *gomock.Call
- func (mr *MockDiffMockRecorder) GetTx(txID any) *gomock.Call
- func (mr *MockDiffMockRecorder) GetUTXO(utxoID any) *gomock.Call
- func (mr *MockDiffMockRecorder) HasExpiry(arg0 any) *gomock.Call
- func (mr *MockDiffMockRecorder) HasSubnetOnlyValidator(subnetID, nodeID any) *gomock.Call
- func (mr *MockDiffMockRecorder) NumActiveSubnetOnlyValidators() *gomock.Call
- func (mr *MockDiffMockRecorder) PutCurrentDelegator(staker any) *gomock.Call
- func (mr *MockDiffMockRecorder) PutCurrentValidator(staker any) *gomock.Call
- func (mr *MockDiffMockRecorder) PutExpiry(arg0 any) *gomock.Call
- func (mr *MockDiffMockRecorder) PutPendingDelegator(staker any) *gomock.Call
- func (mr *MockDiffMockRecorder) PutPendingValidator(staker any) *gomock.Call
- func (mr *MockDiffMockRecorder) PutSubnetOnlyValidator(sov any) *gomock.Call
- func (mr *MockDiffMockRecorder) SetAccruedFees(f any) *gomock.Call
- func (mr *MockDiffMockRecorder) SetCurrentSupply(subnetID, cs any) *gomock.Call
- func (mr *MockDiffMockRecorder) SetDelegateeReward(subnetID, nodeID, amount any) *gomock.Call
- func (mr *MockDiffMockRecorder) SetFeeState(f any) *gomock.Call
- func (mr *MockDiffMockRecorder) SetSoVExcess(e any) *gomock.Call
- func (mr *MockDiffMockRecorder) SetSubnetConversion(subnetID, conversionID, chainID, addr any) *gomock.Call
- func (mr *MockDiffMockRecorder) SetSubnetOwner(subnetID, owner any) *gomock.Call
- func (mr *MockDiffMockRecorder) SetTimestamp(tm any) *gomock.Call
- func (mr *MockDiffMockRecorder) WeightOfSubnetOnlyValidators(subnetID any) *gomock.Call
- type MockState
- func (m *MockState) Abort()
- func (m *MockState) AddChain(createChainTx *txs.Tx)
- func (m *MockState) AddRewardUTXO(txID ids.ID, utxo *avax.UTXO)
- func (m *MockState) AddStatelessBlock(block block.Block)
- func (m *MockState) AddSubnet(subnetID ids.ID)
- func (m *MockState) AddSubnetTransformation(transformSubnetTx *txs.Tx)
- func (m *MockState) AddTx(tx *txs.Tx, status status.Status)
- func (m *MockState) AddUTXO(utxo *avax.UTXO)
- func (m *MockState) ApplyValidatorPublicKeyDiffs(ctx context.Context, validators map[ids.NodeID]*validators.GetValidatorOutput, ...) error
- func (m *MockState) ApplyValidatorWeightDiffs(ctx context.Context, validators 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(staker *Staker)
- func (m *MockState) DeleteCurrentValidator(staker *Staker)
- func (m *MockState) DeleteExpiry(arg0 ExpiryEntry)
- func (m *MockState) DeletePendingDelegator(staker *Staker)
- func (m *MockState) DeletePendingValidator(staker *Staker)
- func (m *MockState) DeleteUTXO(utxoID ids.ID)
- func (m *MockState) EXPECT() *MockStateMockRecorder
- func (m *MockState) GetAccruedFees() uint64
- func (m *MockState) GetActiveSubnetOnlyValidatorsIterator() (iterator.Iterator[SubnetOnlyValidator], error)
- func (m *MockState) GetBlockIDAtHeight(height uint64) (ids.ID, error)
- func (m *MockState) GetChains(subnetID ids.ID) ([]*txs.Tx, error)
- func (m *MockState) GetCurrentDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
- func (m *MockState) GetCurrentStakerIterator() (iterator.Iterator[*Staker], error)
- func (m *MockState) GetCurrentSupply(subnetID ids.ID) (uint64, error)
- func (m *MockState) GetCurrentValidator(subnetID ids.ID, nodeID ids.NodeID) (*Staker, error)
- func (m *MockState) GetDelegateeReward(subnetID ids.ID, nodeID ids.NodeID) (uint64, error)
- func (m *MockState) GetExpiryIterator() (iterator.Iterator[ExpiryEntry], error)
- func (m *MockState) GetFeeState() gas.State
- func (m *MockState) GetLastAccepted() ids.ID
- func (m *MockState) GetPendingDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
- func (m *MockState) GetPendingStakerIterator() (iterator.Iterator[*Staker], error)
- func (m *MockState) GetPendingValidator(subnetID ids.ID, nodeID ids.NodeID) (*Staker, error)
- func (m *MockState) GetRewardUTXOs(txID ids.ID) ([]*avax.UTXO, error)
- func (m *MockState) GetSoVExcess() gas.Gas
- func (m *MockState) GetStartTime(nodeID ids.NodeID) (time.Time, error)
- func (m *MockState) GetStatelessBlock(blockID ids.ID) (block.Block, error)
- func (m *MockState) GetSubnetConversion(subnetID ids.ID) (ids.ID, ids.ID, []byte, error)
- func (m *MockState) GetSubnetIDs() ([]ids.ID, error)
- func (m *MockState) GetSubnetOnlyValidator(validationID ids.ID) (SubnetOnlyValidator, error)
- func (m *MockState) GetSubnetOwner(subnetID ids.ID) (fx.Owner, error)
- func (m *MockState) GetSubnetTransformation(subnetID ids.ID) (*txs.Tx, error)
- func (m *MockState) GetTimestamp() time.Time
- func (m *MockState) GetTx(txID ids.ID) (*txs.Tx, status.Status, error)
- func (m *MockState) GetUTXO(utxoID ids.ID) (*avax.UTXO, error)
- func (m *MockState) GetUptime(nodeID ids.NodeID) (time.Duration, time.Time, error)
- func (m *MockState) HasExpiry(arg0 ExpiryEntry) (bool, error)
- func (m *MockState) HasSubnetOnlyValidator(subnetID ids.ID, nodeID ids.NodeID) (bool, error)
- func (m *MockState) NumActiveSubnetOnlyValidators() int
- func (m *MockState) PutCurrentDelegator(staker *Staker)
- func (m *MockState) PutCurrentValidator(staker *Staker) error
- func (m *MockState) PutExpiry(arg0 ExpiryEntry)
- func (m *MockState) PutPendingDelegator(staker *Staker)
- func (m *MockState) PutPendingValidator(staker *Staker) error
- func (m *MockState) PutSubnetOnlyValidator(sov SubnetOnlyValidator) error
- func (m *MockState) ReindexBlocks(lock sync.Locker, log logging.Logger) error
- func (m *MockState) SetAccruedFees(f uint64)
- func (m *MockState) SetCurrentSupply(subnetID ids.ID, cs uint64)
- func (m *MockState) SetDelegateeReward(subnetID ids.ID, nodeID ids.NodeID, amount uint64) error
- func (m *MockState) SetFeeState(f gas.State)
- func (m *MockState) SetHeight(height uint64)
- func (m *MockState) SetLastAccepted(blkID ids.ID)
- func (m *MockState) SetSoVExcess(e gas.Gas)
- func (m *MockState) SetSubnetConversion(subnetID, conversionID, chainID ids.ID, addr []byte)
- func (m *MockState) SetSubnetOwner(subnetID ids.ID, owner fx.Owner)
- func (m *MockState) SetTimestamp(tm time.Time)
- func (m *MockState) SetUptime(nodeID ids.NodeID, upDuration time.Duration, lastUpdated time.Time) error
- func (m *MockState) UTXOIDs(addr []byte, previous ids.ID, limit int) ([]ids.ID, error)
- func (m *MockState) WeightOfSubnetOnlyValidators(subnetID ids.ID) (uint64, error)
- type MockStateMockRecorder
- func (mr *MockStateMockRecorder) Abort() *gomock.Call
- func (mr *MockStateMockRecorder) AddChain(createChainTx any) *gomock.Call
- func (mr *MockStateMockRecorder) AddRewardUTXO(txID, utxo any) *gomock.Call
- func (mr *MockStateMockRecorder) AddStatelessBlock(block any) *gomock.Call
- func (mr *MockStateMockRecorder) AddSubnet(subnetID any) *gomock.Call
- func (mr *MockStateMockRecorder) AddSubnetTransformation(transformSubnetTx any) *gomock.Call
- func (mr *MockStateMockRecorder) AddTx(tx, status any) *gomock.Call
- func (mr *MockStateMockRecorder) AddUTXO(utxo any) *gomock.Call
- func (mr *MockStateMockRecorder) ApplyValidatorPublicKeyDiffs(ctx, validators, startHeight, endHeight, subnetID any) *gomock.Call
- func (mr *MockStateMockRecorder) ApplyValidatorWeightDiffs(ctx, validators, startHeight, endHeight, subnetID any) *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(staker any) *gomock.Call
- func (mr *MockStateMockRecorder) DeleteCurrentValidator(staker any) *gomock.Call
- func (mr *MockStateMockRecorder) DeleteExpiry(arg0 any) *gomock.Call
- func (mr *MockStateMockRecorder) DeletePendingDelegator(staker any) *gomock.Call
- func (mr *MockStateMockRecorder) DeletePendingValidator(staker any) *gomock.Call
- func (mr *MockStateMockRecorder) DeleteUTXO(utxoID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetAccruedFees() *gomock.Call
- func (mr *MockStateMockRecorder) GetActiveSubnetOnlyValidatorsIterator() *gomock.Call
- func (mr *MockStateMockRecorder) GetBlockIDAtHeight(height any) *gomock.Call
- func (mr *MockStateMockRecorder) GetChains(subnetID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetCurrentDelegatorIterator(subnetID, nodeID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetCurrentStakerIterator() *gomock.Call
- func (mr *MockStateMockRecorder) GetCurrentSupply(subnetID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetCurrentValidator(subnetID, nodeID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetDelegateeReward(subnetID, nodeID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetExpiryIterator() *gomock.Call
- func (mr *MockStateMockRecorder) GetFeeState() *gomock.Call
- func (mr *MockStateMockRecorder) GetLastAccepted() *gomock.Call
- func (mr *MockStateMockRecorder) GetPendingDelegatorIterator(subnetID, nodeID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetPendingStakerIterator() *gomock.Call
- func (mr *MockStateMockRecorder) GetPendingValidator(subnetID, nodeID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetRewardUTXOs(txID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetSoVExcess() *gomock.Call
- func (mr *MockStateMockRecorder) GetStartTime(nodeID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetStatelessBlock(blockID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetSubnetConversion(subnetID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetSubnetIDs() *gomock.Call
- func (mr *MockStateMockRecorder) GetSubnetOnlyValidator(validationID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetSubnetOwner(subnetID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetSubnetTransformation(subnetID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetTimestamp() *gomock.Call
- func (mr *MockStateMockRecorder) GetTx(txID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetUTXO(utxoID any) *gomock.Call
- func (mr *MockStateMockRecorder) GetUptime(nodeID any) *gomock.Call
- func (mr *MockStateMockRecorder) HasExpiry(arg0 any) *gomock.Call
- func (mr *MockStateMockRecorder) HasSubnetOnlyValidator(subnetID, nodeID any) *gomock.Call
- func (mr *MockStateMockRecorder) NumActiveSubnetOnlyValidators() *gomock.Call
- func (mr *MockStateMockRecorder) PutCurrentDelegator(staker any) *gomock.Call
- func (mr *MockStateMockRecorder) PutCurrentValidator(staker any) *gomock.Call
- func (mr *MockStateMockRecorder) PutExpiry(arg0 any) *gomock.Call
- func (mr *MockStateMockRecorder) PutPendingDelegator(staker any) *gomock.Call
- func (mr *MockStateMockRecorder) PutPendingValidator(staker any) *gomock.Call
- func (mr *MockStateMockRecorder) PutSubnetOnlyValidator(sov any) *gomock.Call
- func (mr *MockStateMockRecorder) ReindexBlocks(lock, log any) *gomock.Call
- func (mr *MockStateMockRecorder) SetAccruedFees(f any) *gomock.Call
- func (mr *MockStateMockRecorder) SetCurrentSupply(subnetID, cs any) *gomock.Call
- func (mr *MockStateMockRecorder) SetDelegateeReward(subnetID, nodeID, amount any) *gomock.Call
- func (mr *MockStateMockRecorder) SetFeeState(f any) *gomock.Call
- func (mr *MockStateMockRecorder) SetHeight(height any) *gomock.Call
- func (mr *MockStateMockRecorder) SetLastAccepted(blkID any) *gomock.Call
- func (mr *MockStateMockRecorder) SetSoVExcess(e any) *gomock.Call
- func (mr *MockStateMockRecorder) SetSubnetConversion(subnetID, conversionID, chainID, addr any) *gomock.Call
- func (mr *MockStateMockRecorder) SetSubnetOwner(subnetID, owner any) *gomock.Call
- func (mr *MockStateMockRecorder) SetTimestamp(tm any) *gomock.Call
- func (mr *MockStateMockRecorder) SetUptime(nodeID, upDuration, lastUpdated any) *gomock.Call
- func (mr *MockStateMockRecorder) UTXOIDs(addr, previous, limit any) *gomock.Call
- func (mr *MockStateMockRecorder) WeightOfSubnetOnlyValidators(subnetID any) *gomock.Call
- type PendingStakers
- type Staker
- type StakerDiffIterator
- type Stakers
- type State
- type SubnetOnlyValidator
- type SubnetOnlyValidators
- type ValidatorWeightDiff
- type Versions
Constants ¶
const ( CodecVersion0Tag = "v0" CodecVersion0 uint16 = 0 CodecVersion1Tag = "v1" CodecVersion1 uint16 = 1 )
Variables ¶
var ( BlockIDPrefix = []byte("blockID") BlockPrefix = []byte("block") ValidatorsPrefix = []byte("validators") CurrentPrefix = []byte("current") PendingPrefix = []byte("pending") ValidatorPrefix = []byte("validator") DelegatorPrefix = []byte("delegator") SubnetValidatorPrefix = []byte("subnetValidator") SubnetDelegatorPrefix = []byte("subnetDelegator") ValidatorWeightDiffsPrefix = []byte("flatValidatorDiffs") ValidatorPublicKeyDiffsPrefix = []byte("flatPublicKeyDiffs") TxPrefix = []byte("tx") RewardUTXOsPrefix = []byte("rewardUTXOs") UTXOPrefix = []byte("utxo") SubnetPrefix = []byte("subnet") SubnetOwnerPrefix = []byte("subnetOwner") SubnetManagerPrefix = []byte("subnetManager") TransformedSubnetPrefix = []byte("transformedSubnet") SupplyPrefix = []byte("supply") ChainPrefix = []byte("chain") ExpiryReplayProtectionPrefix = []byte("expiryReplayProtection") SubnetOnlyValidatorsPrefix = []byte("subnetOnlyValidators") WeightsPrefix = []byte("weights") SubnetIDNodeIDPrefix = []byte("subnetIDNodeID") ActivePrefix = []byte("active") InactivePrefix = []byte("inactive") SingletonPrefix = []byte("singleton") TimestampKey = []byte("timestamp") FeeStateKey = []byte("fee state") SoVExcessKey = []byte("sov excess") AccruedFeesKey = []byte("accrued fees") CurrentSupplyKey = []byte("current supply") LastAcceptedKey = []byte("last accepted") HeightsIndexedKey = []byte("heights indexed") InitializedKey = []byte("initialized") BlocksReindexedKey = []byte("blocks reindexed") )
var ( ErrMutatedSubnetOnlyValidator = errors.New("subnet only validator contains mutated constant fields") ErrDuplicateSubnetOnlyValidator = errors.New("subnet only validator contains conflicting subnetID + nodeID pair") )
var ErrAddingStakerAfterDeletion = errors.New("attempted to add a staker after deleting it")
var (
ErrMissingParentState = errors.New("missing parent state")
)
var MetadataCodec codec.Manager
Functions ¶
func GetNextStakerChangeTime ¶ added in v1.11.9
func GetNextStakerChangeTime( config validatorfee.Config, state Chain, defaultTime time.Time, ) (time.Time, error)
GetNextStakerChangeTime returns the next time a staker will be either added or removed to/from the current validator set. If the next staker change time is further in the future than [defaultTime], then [defaultTime] is returned.
func NewStaticFeeCalculator ¶ added in v1.11.11
NewStaticFeeCalculator creates a static fee calculator, with the config set to either the pre-AP3 or post-AP3 config.
func NextBlockTime ¶ added in v1.11.9
func PickFeeCalculator ¶ added in v1.11.10
func PickFeeCalculator(config *config.Config, state Chain) txfee.Calculator
PickFeeCalculator creates either a static or a dynamic fee calculator, depending on the active upgrade.
PickFeeCalculator does not modify state.
Types ¶
type Chain ¶
type Chain interface { Expiry SubnetOnlyValidators Stakers avax.UTXOAdder avax.UTXOGetter avax.UTXODeleter GetTimestamp() time.Time SetTimestamp(tm time.Time) GetFeeState() gas.State SetFeeState(f gas.State) GetSoVExcess() gas.Gas SetSoVExcess(e gas.Gas) GetAccruedFees() uint64 SetAccruedFees(f uint64) GetCurrentSupply(subnetID ids.ID) (uint64, error) SetCurrentSupply(subnetID ids.ID, cs uint64) AddRewardUTXO(txID ids.ID, utxo *avax.UTXO) AddSubnet(subnetID ids.ID) GetSubnetOwner(subnetID ids.ID) (fx.Owner, error) SetSubnetOwner(subnetID ids.ID, owner fx.Owner) GetSubnetConversion(subnetID ids.ID) (ids.ID, ids.ID, []byte, error) SetSubnetConversion(subnetID ids.ID, conversionID ids.ID, chainID ids.ID, addr []byte) GetSubnetTransformation(subnetID ids.ID) (*txs.Tx, error) AddSubnetTransformation(transformSubnetTx *txs.Tx) 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) error // 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) (iterator.Iterator[*Staker], 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() (iterator.Iterator[*Staker], error) }
type Expiry ¶ added in v1.11.12
type Expiry interface { // GetExpiryIterator returns an iterator of all the expiry entries in order // of lowest to highest timestamp. GetExpiryIterator() (iterator.Iterator[ExpiryEntry], error) // HasExpiry returns true if the database has the specified entry. HasExpiry(ExpiryEntry) (bool, error) // PutExpiry adds the entry to the database. If the entry already exists, it // is a noop. PutExpiry(ExpiryEntry) // DeleteExpiry removes the entry from the database. If the entry doesn't // exist, it is a noop. DeleteExpiry(ExpiryEntry) }
type ExpiryEntry ¶ added in v1.11.12
func (ExpiryEntry) Compare ¶ added in v1.11.12
func (e ExpiryEntry) Compare(o ExpiryEntry) int
Invariant: Compare produces the same ordering as the marshalled bytes.
func (ExpiryEntry) Less ¶ added in v1.11.12
func (e ExpiryEntry) Less(o ExpiryEntry) bool
func (*ExpiryEntry) Marshal ¶ added in v1.11.12
func (e *ExpiryEntry) Marshal() []byte
func (*ExpiryEntry) Unmarshal ¶ added in v1.11.12
func (e *ExpiryEntry) Unmarshal(data []byte) 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) DeleteExpiry ¶ added in v1.11.12
func (m *MockChain) DeleteExpiry(arg0 ExpiryEntry)
DeleteExpiry 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) GetAccruedFees ¶ added in v1.11.12
GetAccruedFees mocks base method.
func (*MockChain) GetActiveSubnetOnlyValidatorsIterator ¶
func (m *MockChain) GetActiveSubnetOnlyValidatorsIterator() (iterator.Iterator[SubnetOnlyValidator], error)
GetActiveSubnetOnlyValidatorsIterator mocks base method.
func (*MockChain) GetCurrentDelegatorIterator ¶ added in v1.7.17
func (m *MockChain) GetCurrentDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
GetCurrentDelegatorIterator mocks base method.
func (*MockChain) GetCurrentStakerIterator ¶ added in v1.7.17
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) GetExpiryIterator ¶ added in v1.11.12
func (m *MockChain) GetExpiryIterator() (iterator.Iterator[ExpiryEntry], error)
GetExpiryIterator mocks base method.
func (*MockChain) GetFeeState ¶ added in v1.11.11
GetFeeState mocks base method.
func (*MockChain) GetPendingDelegatorIterator ¶ added in v1.7.17
func (m *MockChain) GetPendingDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
GetPendingDelegatorIterator mocks base method.
func (*MockChain) GetPendingStakerIterator ¶ added in v1.7.17
GetPendingStakerIterator mocks base method.
func (*MockChain) GetPendingValidator ¶ added in v1.7.17
GetPendingValidator mocks base method.
func (*MockChain) GetSoVExcess ¶
GetSoVExcess mocks base method.
func (*MockChain) GetSubnetConversion ¶
GetSubnetConversion mocks base method.
func (*MockChain) GetSubnetOnlyValidator ¶
func (m *MockChain) GetSubnetOnlyValidator(validationID ids.ID) (SubnetOnlyValidator, error)
GetSubnetOnlyValidator 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) GetTimestamp ¶ added in v1.7.17
GetTimestamp mocks base method.
func (*MockChain) HasExpiry ¶ added in v1.11.12
func (m *MockChain) HasExpiry(arg0 ExpiryEntry) (bool, error)
HasExpiry mocks base method.
func (*MockChain) HasSubnetOnlyValidator ¶
HasSubnetOnlyValidator mocks base method.
func (*MockChain) NumActiveSubnetOnlyValidators ¶
NumActiveSubnetOnlyValidators 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) PutExpiry ¶ added in v1.11.12
func (m *MockChain) PutExpiry(arg0 ExpiryEntry)
PutExpiry 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) PutSubnetOnlyValidator ¶
func (m *MockChain) PutSubnetOnlyValidator(sov SubnetOnlyValidator) error
PutSubnetOnlyValidator mocks base method.
func (*MockChain) SetAccruedFees ¶ added in v1.11.12
SetAccruedFees 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) SetFeeState ¶ added in v1.11.11
SetFeeState mocks base method.
func (*MockChain) SetSoVExcess ¶
SetSoVExcess mocks base method.
func (*MockChain) SetSubnetConversion ¶
SetSubnetConversion 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(createChainTx any) *gomock.Call
AddChain indicates an expected call of AddChain.
func (*MockChainMockRecorder) AddRewardUTXO ¶ added in v1.7.17
func (mr *MockChainMockRecorder) AddRewardUTXO(txID, utxo any) *gomock.Call
AddRewardUTXO indicates an expected call of AddRewardUTXO.
func (*MockChainMockRecorder) AddSubnet ¶ added in v1.7.17
func (mr *MockChainMockRecorder) AddSubnet(subnetID any) *gomock.Call
AddSubnet indicates an expected call of AddSubnet.
func (*MockChainMockRecorder) AddSubnetTransformation ¶ added in v1.8.0
func (mr *MockChainMockRecorder) AddSubnetTransformation(transformSubnetTx any) *gomock.Call
AddSubnetTransformation indicates an expected call of AddSubnetTransformation.
func (*MockChainMockRecorder) AddTx ¶ added in v1.7.17
func (mr *MockChainMockRecorder) AddTx(tx, status any) *gomock.Call
AddTx indicates an expected call of AddTx.
func (*MockChainMockRecorder) AddUTXO ¶ added in v1.7.17
func (mr *MockChainMockRecorder) AddUTXO(utxo any) *gomock.Call
AddUTXO indicates an expected call of AddUTXO.
func (*MockChainMockRecorder) DeleteCurrentDelegator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeleteCurrentDelegator(staker any) *gomock.Call
DeleteCurrentDelegator indicates an expected call of DeleteCurrentDelegator.
func (*MockChainMockRecorder) DeleteCurrentValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeleteCurrentValidator(staker any) *gomock.Call
DeleteCurrentValidator indicates an expected call of DeleteCurrentValidator.
func (*MockChainMockRecorder) DeleteExpiry ¶ added in v1.11.12
func (mr *MockChainMockRecorder) DeleteExpiry(arg0 any) *gomock.Call
DeleteExpiry indicates an expected call of DeleteExpiry.
func (*MockChainMockRecorder) DeletePendingDelegator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeletePendingDelegator(staker any) *gomock.Call
DeletePendingDelegator indicates an expected call of DeletePendingDelegator.
func (*MockChainMockRecorder) DeletePendingValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeletePendingValidator(staker any) *gomock.Call
DeletePendingValidator indicates an expected call of DeletePendingValidator.
func (*MockChainMockRecorder) DeleteUTXO ¶ added in v1.7.17
func (mr *MockChainMockRecorder) DeleteUTXO(utxoID any) *gomock.Call
DeleteUTXO indicates an expected call of DeleteUTXO.
func (*MockChainMockRecorder) GetAccruedFees ¶ added in v1.11.12
func (mr *MockChainMockRecorder) GetAccruedFees() *gomock.Call
GetAccruedFees indicates an expected call of GetAccruedFees.
func (*MockChainMockRecorder) GetActiveSubnetOnlyValidatorsIterator ¶
func (mr *MockChainMockRecorder) GetActiveSubnetOnlyValidatorsIterator() *gomock.Call
GetActiveSubnetOnlyValidatorsIterator indicates an expected call of GetActiveSubnetOnlyValidatorsIterator.
func (*MockChainMockRecorder) GetCurrentDelegatorIterator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetCurrentDelegatorIterator(subnetID, nodeID any) *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(subnetID any) *gomock.Call
GetCurrentSupply indicates an expected call of GetCurrentSupply.
func (*MockChainMockRecorder) GetCurrentValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetCurrentValidator(subnetID, nodeID any) *gomock.Call
GetCurrentValidator indicates an expected call of GetCurrentValidator.
func (*MockChainMockRecorder) GetDelegateeReward ¶ added in v1.10.0
func (mr *MockChainMockRecorder) GetDelegateeReward(subnetID, nodeID any) *gomock.Call
GetDelegateeReward indicates an expected call of GetDelegateeReward.
func (*MockChainMockRecorder) GetExpiryIterator ¶ added in v1.11.12
func (mr *MockChainMockRecorder) GetExpiryIterator() *gomock.Call
GetExpiryIterator indicates an expected call of GetExpiryIterator.
func (*MockChainMockRecorder) GetFeeState ¶ added in v1.11.11
func (mr *MockChainMockRecorder) GetFeeState() *gomock.Call
GetFeeState indicates an expected call of GetFeeState.
func (*MockChainMockRecorder) GetPendingDelegatorIterator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetPendingDelegatorIterator(subnetID, nodeID any) *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(subnetID, nodeID any) *gomock.Call
GetPendingValidator indicates an expected call of GetPendingValidator.
func (*MockChainMockRecorder) GetSoVExcess ¶
func (mr *MockChainMockRecorder) GetSoVExcess() *gomock.Call
GetSoVExcess indicates an expected call of GetSoVExcess.
func (*MockChainMockRecorder) GetSubnetConversion ¶
func (mr *MockChainMockRecorder) GetSubnetConversion(subnetID any) *gomock.Call
GetSubnetConversion indicates an expected call of GetSubnetConversion.
func (*MockChainMockRecorder) GetSubnetOnlyValidator ¶
func (mr *MockChainMockRecorder) GetSubnetOnlyValidator(validationID any) *gomock.Call
GetSubnetOnlyValidator indicates an expected call of GetSubnetOnlyValidator.
func (*MockChainMockRecorder) GetSubnetOwner ¶ added in v1.10.10
func (mr *MockChainMockRecorder) GetSubnetOwner(subnetID any) *gomock.Call
GetSubnetOwner indicates an expected call of GetSubnetOwner.
func (*MockChainMockRecorder) GetSubnetTransformation ¶ added in v1.8.0
func (mr *MockChainMockRecorder) GetSubnetTransformation(subnetID any) *gomock.Call
GetSubnetTransformation indicates an expected call of GetSubnetTransformation.
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(txID any) *gomock.Call
GetTx indicates an expected call of GetTx.
func (*MockChainMockRecorder) GetUTXO ¶ added in v1.7.17
func (mr *MockChainMockRecorder) GetUTXO(utxoID any) *gomock.Call
GetUTXO indicates an expected call of GetUTXO.
func (*MockChainMockRecorder) HasExpiry ¶ added in v1.11.12
func (mr *MockChainMockRecorder) HasExpiry(arg0 any) *gomock.Call
HasExpiry indicates an expected call of HasExpiry.
func (*MockChainMockRecorder) HasSubnetOnlyValidator ¶
func (mr *MockChainMockRecorder) HasSubnetOnlyValidator(subnetID, nodeID any) *gomock.Call
HasSubnetOnlyValidator indicates an expected call of HasSubnetOnlyValidator.
func (*MockChainMockRecorder) NumActiveSubnetOnlyValidators ¶
func (mr *MockChainMockRecorder) NumActiveSubnetOnlyValidators() *gomock.Call
NumActiveSubnetOnlyValidators indicates an expected call of NumActiveSubnetOnlyValidators.
func (*MockChainMockRecorder) PutCurrentDelegator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) PutCurrentDelegator(staker any) *gomock.Call
PutCurrentDelegator indicates an expected call of PutCurrentDelegator.
func (*MockChainMockRecorder) PutCurrentValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) PutCurrentValidator(staker any) *gomock.Call
PutCurrentValidator indicates an expected call of PutCurrentValidator.
func (*MockChainMockRecorder) PutExpiry ¶ added in v1.11.12
func (mr *MockChainMockRecorder) PutExpiry(arg0 any) *gomock.Call
PutExpiry indicates an expected call of PutExpiry.
func (*MockChainMockRecorder) PutPendingDelegator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) PutPendingDelegator(staker any) *gomock.Call
PutPendingDelegator indicates an expected call of PutPendingDelegator.
func (*MockChainMockRecorder) PutPendingValidator ¶ added in v1.7.17
func (mr *MockChainMockRecorder) PutPendingValidator(staker any) *gomock.Call
PutPendingValidator indicates an expected call of PutPendingValidator.
func (*MockChainMockRecorder) PutSubnetOnlyValidator ¶
func (mr *MockChainMockRecorder) PutSubnetOnlyValidator(sov any) *gomock.Call
PutSubnetOnlyValidator indicates an expected call of PutSubnetOnlyValidator.
func (*MockChainMockRecorder) SetAccruedFees ¶ added in v1.11.12
func (mr *MockChainMockRecorder) SetAccruedFees(f any) *gomock.Call
SetAccruedFees indicates an expected call of SetAccruedFees.
func (*MockChainMockRecorder) SetCurrentSupply ¶ added in v1.7.17
func (mr *MockChainMockRecorder) SetCurrentSupply(subnetID, cs any) *gomock.Call
SetCurrentSupply indicates an expected call of SetCurrentSupply.
func (*MockChainMockRecorder) SetDelegateeReward ¶ added in v1.10.0
func (mr *MockChainMockRecorder) SetDelegateeReward(subnetID, nodeID, amount any) *gomock.Call
SetDelegateeReward indicates an expected call of SetDelegateeReward.
func (*MockChainMockRecorder) SetFeeState ¶ added in v1.11.11
func (mr *MockChainMockRecorder) SetFeeState(f any) *gomock.Call
SetFeeState indicates an expected call of SetFeeState.
func (*MockChainMockRecorder) SetSoVExcess ¶
func (mr *MockChainMockRecorder) SetSoVExcess(e any) *gomock.Call
SetSoVExcess indicates an expected call of SetSoVExcess.
func (*MockChainMockRecorder) SetSubnetConversion ¶
func (mr *MockChainMockRecorder) SetSubnetConversion(subnetID, conversionID, chainID, addr any) *gomock.Call
SetSubnetConversion indicates an expected call of SetSubnetConversion.
func (*MockChainMockRecorder) SetSubnetOwner ¶ added in v1.10.12
func (mr *MockChainMockRecorder) SetSubnetOwner(subnetID, owner any) *gomock.Call
SetSubnetOwner indicates an expected call of SetSubnetOwner.
func (*MockChainMockRecorder) SetTimestamp ¶ added in v1.7.17
func (mr *MockChainMockRecorder) SetTimestamp(tm any) *gomock.Call
SetTimestamp indicates an expected call of SetTimestamp.
func (*MockChainMockRecorder) WeightOfSubnetOnlyValidators ¶
func (mr *MockChainMockRecorder) WeightOfSubnetOnlyValidators(subnetID any) *gomock.Call
WeightOfSubnetOnlyValidators indicates an expected call of WeightOfSubnetOnlyValidators.
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) DeleteExpiry ¶ added in v1.11.12
func (m *MockDiff) DeleteExpiry(arg0 ExpiryEntry)
DeleteExpiry 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) GetAccruedFees ¶ added in v1.11.12
GetAccruedFees mocks base method.
func (*MockDiff) GetActiveSubnetOnlyValidatorsIterator ¶
func (m *MockDiff) GetActiveSubnetOnlyValidatorsIterator() (iterator.Iterator[SubnetOnlyValidator], error)
GetActiveSubnetOnlyValidatorsIterator mocks base method.
func (*MockDiff) GetCurrentDelegatorIterator ¶ added in v1.7.17
func (m *MockDiff) GetCurrentDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
GetCurrentDelegatorIterator mocks base method.
func (*MockDiff) GetCurrentStakerIterator ¶ added in v1.7.17
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) GetExpiryIterator ¶ added in v1.11.12
func (m *MockDiff) GetExpiryIterator() (iterator.Iterator[ExpiryEntry], error)
GetExpiryIterator mocks base method.
func (*MockDiff) GetFeeState ¶ added in v1.11.11
GetFeeState mocks base method.
func (*MockDiff) GetPendingDelegatorIterator ¶ added in v1.7.17
func (m *MockDiff) GetPendingDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
GetPendingDelegatorIterator mocks base method.
func (*MockDiff) GetPendingStakerIterator ¶ added in v1.7.17
GetPendingStakerIterator mocks base method.
func (*MockDiff) GetPendingValidator ¶ added in v1.7.17
GetPendingValidator mocks base method.
func (*MockDiff) GetSoVExcess ¶
GetSoVExcess mocks base method.
func (*MockDiff) GetSubnetConversion ¶
GetSubnetConversion mocks base method.
func (*MockDiff) GetSubnetOnlyValidator ¶
func (m *MockDiff) GetSubnetOnlyValidator(validationID ids.ID) (SubnetOnlyValidator, error)
GetSubnetOnlyValidator 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) GetTimestamp ¶ added in v1.7.17
GetTimestamp mocks base method.
func (*MockDiff) HasExpiry ¶ added in v1.11.12
func (m *MockDiff) HasExpiry(arg0 ExpiryEntry) (bool, error)
HasExpiry mocks base method.
func (*MockDiff) HasSubnetOnlyValidator ¶
HasSubnetOnlyValidator mocks base method.
func (*MockDiff) NumActiveSubnetOnlyValidators ¶
NumActiveSubnetOnlyValidators 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) PutExpiry ¶ added in v1.11.12
func (m *MockDiff) PutExpiry(arg0 ExpiryEntry)
PutExpiry 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) PutSubnetOnlyValidator ¶
func (m *MockDiff) PutSubnetOnlyValidator(sov SubnetOnlyValidator) error
PutSubnetOnlyValidator mocks base method.
func (*MockDiff) SetAccruedFees ¶ added in v1.11.12
SetAccruedFees 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) SetFeeState ¶ added in v1.11.11
SetFeeState mocks base method.
func (*MockDiff) SetSoVExcess ¶
SetSoVExcess mocks base method.
func (*MockDiff) SetSubnetConversion ¶
SetSubnetConversion 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(createChainTx any) *gomock.Call
AddChain indicates an expected call of AddChain.
func (*MockDiffMockRecorder) AddRewardUTXO ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) AddRewardUTXO(txID, utxo any) *gomock.Call
AddRewardUTXO indicates an expected call of AddRewardUTXO.
func (*MockDiffMockRecorder) AddSubnet ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) AddSubnet(subnetID any) *gomock.Call
AddSubnet indicates an expected call of AddSubnet.
func (*MockDiffMockRecorder) AddSubnetTransformation ¶ added in v1.8.0
func (mr *MockDiffMockRecorder) AddSubnetTransformation(transformSubnetTx any) *gomock.Call
AddSubnetTransformation indicates an expected call of AddSubnetTransformation.
func (*MockDiffMockRecorder) AddTx ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) AddTx(tx, status any) *gomock.Call
AddTx indicates an expected call of AddTx.
func (*MockDiffMockRecorder) AddUTXO ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) AddUTXO(utxo any) *gomock.Call
AddUTXO indicates an expected call of AddUTXO.
func (*MockDiffMockRecorder) Apply ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) Apply(arg0 any) *gomock.Call
Apply indicates an expected call of Apply.
func (*MockDiffMockRecorder) DeleteCurrentDelegator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeleteCurrentDelegator(staker any) *gomock.Call
DeleteCurrentDelegator indicates an expected call of DeleteCurrentDelegator.
func (*MockDiffMockRecorder) DeleteCurrentValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeleteCurrentValidator(staker any) *gomock.Call
DeleteCurrentValidator indicates an expected call of DeleteCurrentValidator.
func (*MockDiffMockRecorder) DeleteExpiry ¶ added in v1.11.12
func (mr *MockDiffMockRecorder) DeleteExpiry(arg0 any) *gomock.Call
DeleteExpiry indicates an expected call of DeleteExpiry.
func (*MockDiffMockRecorder) DeletePendingDelegator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeletePendingDelegator(staker any) *gomock.Call
DeletePendingDelegator indicates an expected call of DeletePendingDelegator.
func (*MockDiffMockRecorder) DeletePendingValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeletePendingValidator(staker any) *gomock.Call
DeletePendingValidator indicates an expected call of DeletePendingValidator.
func (*MockDiffMockRecorder) DeleteUTXO ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) DeleteUTXO(utxoID any) *gomock.Call
DeleteUTXO indicates an expected call of DeleteUTXO.
func (*MockDiffMockRecorder) GetAccruedFees ¶ added in v1.11.12
func (mr *MockDiffMockRecorder) GetAccruedFees() *gomock.Call
GetAccruedFees indicates an expected call of GetAccruedFees.
func (*MockDiffMockRecorder) GetActiveSubnetOnlyValidatorsIterator ¶
func (mr *MockDiffMockRecorder) GetActiveSubnetOnlyValidatorsIterator() *gomock.Call
GetActiveSubnetOnlyValidatorsIterator indicates an expected call of GetActiveSubnetOnlyValidatorsIterator.
func (*MockDiffMockRecorder) GetCurrentDelegatorIterator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetCurrentDelegatorIterator(subnetID, nodeID any) *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(subnetID any) *gomock.Call
GetCurrentSupply indicates an expected call of GetCurrentSupply.
func (*MockDiffMockRecorder) GetCurrentValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetCurrentValidator(subnetID, nodeID any) *gomock.Call
GetCurrentValidator indicates an expected call of GetCurrentValidator.
func (*MockDiffMockRecorder) GetDelegateeReward ¶ added in v1.10.0
func (mr *MockDiffMockRecorder) GetDelegateeReward(subnetID, nodeID any) *gomock.Call
GetDelegateeReward indicates an expected call of GetDelegateeReward.
func (*MockDiffMockRecorder) GetExpiryIterator ¶ added in v1.11.12
func (mr *MockDiffMockRecorder) GetExpiryIterator() *gomock.Call
GetExpiryIterator indicates an expected call of GetExpiryIterator.
func (*MockDiffMockRecorder) GetFeeState ¶ added in v1.11.11
func (mr *MockDiffMockRecorder) GetFeeState() *gomock.Call
GetFeeState indicates an expected call of GetFeeState.
func (*MockDiffMockRecorder) GetPendingDelegatorIterator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetPendingDelegatorIterator(subnetID, nodeID any) *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(subnetID, nodeID any) *gomock.Call
GetPendingValidator indicates an expected call of GetPendingValidator.
func (*MockDiffMockRecorder) GetSoVExcess ¶
func (mr *MockDiffMockRecorder) GetSoVExcess() *gomock.Call
GetSoVExcess indicates an expected call of GetSoVExcess.
func (*MockDiffMockRecorder) GetSubnetConversion ¶
func (mr *MockDiffMockRecorder) GetSubnetConversion(subnetID any) *gomock.Call
GetSubnetConversion indicates an expected call of GetSubnetConversion.
func (*MockDiffMockRecorder) GetSubnetOnlyValidator ¶
func (mr *MockDiffMockRecorder) GetSubnetOnlyValidator(validationID any) *gomock.Call
GetSubnetOnlyValidator indicates an expected call of GetSubnetOnlyValidator.
func (*MockDiffMockRecorder) GetSubnetOwner ¶ added in v1.10.10
func (mr *MockDiffMockRecorder) GetSubnetOwner(subnetID any) *gomock.Call
GetSubnetOwner indicates an expected call of GetSubnetOwner.
func (*MockDiffMockRecorder) GetSubnetTransformation ¶ added in v1.8.0
func (mr *MockDiffMockRecorder) GetSubnetTransformation(subnetID any) *gomock.Call
GetSubnetTransformation indicates an expected call of GetSubnetTransformation.
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(txID any) *gomock.Call
GetTx indicates an expected call of GetTx.
func (*MockDiffMockRecorder) GetUTXO ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) GetUTXO(utxoID any) *gomock.Call
GetUTXO indicates an expected call of GetUTXO.
func (*MockDiffMockRecorder) HasExpiry ¶ added in v1.11.12
func (mr *MockDiffMockRecorder) HasExpiry(arg0 any) *gomock.Call
HasExpiry indicates an expected call of HasExpiry.
func (*MockDiffMockRecorder) HasSubnetOnlyValidator ¶
func (mr *MockDiffMockRecorder) HasSubnetOnlyValidator(subnetID, nodeID any) *gomock.Call
HasSubnetOnlyValidator indicates an expected call of HasSubnetOnlyValidator.
func (*MockDiffMockRecorder) NumActiveSubnetOnlyValidators ¶
func (mr *MockDiffMockRecorder) NumActiveSubnetOnlyValidators() *gomock.Call
NumActiveSubnetOnlyValidators indicates an expected call of NumActiveSubnetOnlyValidators.
func (*MockDiffMockRecorder) PutCurrentDelegator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) PutCurrentDelegator(staker any) *gomock.Call
PutCurrentDelegator indicates an expected call of PutCurrentDelegator.
func (*MockDiffMockRecorder) PutCurrentValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) PutCurrentValidator(staker any) *gomock.Call
PutCurrentValidator indicates an expected call of PutCurrentValidator.
func (*MockDiffMockRecorder) PutExpiry ¶ added in v1.11.12
func (mr *MockDiffMockRecorder) PutExpiry(arg0 any) *gomock.Call
PutExpiry indicates an expected call of PutExpiry.
func (*MockDiffMockRecorder) PutPendingDelegator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) PutPendingDelegator(staker any) *gomock.Call
PutPendingDelegator indicates an expected call of PutPendingDelegator.
func (*MockDiffMockRecorder) PutPendingValidator ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) PutPendingValidator(staker any) *gomock.Call
PutPendingValidator indicates an expected call of PutPendingValidator.
func (*MockDiffMockRecorder) PutSubnetOnlyValidator ¶
func (mr *MockDiffMockRecorder) PutSubnetOnlyValidator(sov any) *gomock.Call
PutSubnetOnlyValidator indicates an expected call of PutSubnetOnlyValidator.
func (*MockDiffMockRecorder) SetAccruedFees ¶ added in v1.11.12
func (mr *MockDiffMockRecorder) SetAccruedFees(f any) *gomock.Call
SetAccruedFees indicates an expected call of SetAccruedFees.
func (*MockDiffMockRecorder) SetCurrentSupply ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) SetCurrentSupply(subnetID, cs any) *gomock.Call
SetCurrentSupply indicates an expected call of SetCurrentSupply.
func (*MockDiffMockRecorder) SetDelegateeReward ¶ added in v1.10.0
func (mr *MockDiffMockRecorder) SetDelegateeReward(subnetID, nodeID, amount any) *gomock.Call
SetDelegateeReward indicates an expected call of SetDelegateeReward.
func (*MockDiffMockRecorder) SetFeeState ¶ added in v1.11.11
func (mr *MockDiffMockRecorder) SetFeeState(f any) *gomock.Call
SetFeeState indicates an expected call of SetFeeState.
func (*MockDiffMockRecorder) SetSoVExcess ¶
func (mr *MockDiffMockRecorder) SetSoVExcess(e any) *gomock.Call
SetSoVExcess indicates an expected call of SetSoVExcess.
func (*MockDiffMockRecorder) SetSubnetConversion ¶
func (mr *MockDiffMockRecorder) SetSubnetConversion(subnetID, conversionID, chainID, addr any) *gomock.Call
SetSubnetConversion indicates an expected call of SetSubnetConversion.
func (*MockDiffMockRecorder) SetSubnetOwner ¶ added in v1.10.12
func (mr *MockDiffMockRecorder) SetSubnetOwner(subnetID, owner any) *gomock.Call
SetSubnetOwner indicates an expected call of SetSubnetOwner.
func (*MockDiffMockRecorder) SetTimestamp ¶ added in v1.7.17
func (mr *MockDiffMockRecorder) SetTimestamp(tm any) *gomock.Call
SetTimestamp indicates an expected call of SetTimestamp.
func (*MockDiffMockRecorder) WeightOfSubnetOnlyValidators ¶
func (mr *MockDiffMockRecorder) WeightOfSubnetOnlyValidators(subnetID any) *gomock.Call
WeightOfSubnetOnlyValidators indicates an expected call of WeightOfSubnetOnlyValidators.
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(ctx context.Context, validators map[ids.NodeID]*validators.GetValidatorOutput, startHeight, endHeight uint64, subnetID ids.ID) error
ApplyValidatorPublicKeyDiffs mocks base method.
func (*MockState) ApplyValidatorWeightDiffs ¶ added in v1.10.6
func (m *MockState) ApplyValidatorWeightDiffs(ctx context.Context, validators map[ids.NodeID]*validators.GetValidatorOutput, startHeight, endHeight uint64, subnetID 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) DeleteExpiry ¶ added in v1.11.12
func (m *MockState) DeleteExpiry(arg0 ExpiryEntry)
DeleteExpiry 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) GetAccruedFees ¶ added in v1.11.12
GetAccruedFees mocks base method.
func (*MockState) GetActiveSubnetOnlyValidatorsIterator ¶
func (m *MockState) GetActiveSubnetOnlyValidatorsIterator() (iterator.Iterator[SubnetOnlyValidator], error)
GetActiveSubnetOnlyValidatorsIterator mocks base method.
func (*MockState) GetBlockIDAtHeight ¶ added in v1.10.8
GetBlockIDAtHeight mocks base method.
func (*MockState) GetCurrentDelegatorIterator ¶ added in v1.7.15
func (m *MockState) GetCurrentDelegatorIterator(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
GetCurrentDelegatorIterator mocks base method.
func (*MockState) GetCurrentStakerIterator ¶ added in v1.7.15
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) GetExpiryIterator ¶ added in v1.11.12
func (m *MockState) GetExpiryIterator() (iterator.Iterator[ExpiryEntry], error)
GetExpiryIterator mocks base method.
func (*MockState) GetFeeState ¶ added in v1.11.11
GetFeeState 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(subnetID ids.ID, nodeID ids.NodeID) (iterator.Iterator[*Staker], error)
GetPendingDelegatorIterator mocks base method.
func (*MockState) GetPendingStakerIterator ¶ added in v1.7.15
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) GetSoVExcess ¶
GetSoVExcess 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) GetSubnetConversion ¶
GetSubnetConversion mocks base method.
func (*MockState) GetSubnetIDs ¶ added in v1.11.7
GetSubnetIDs mocks base method.
func (*MockState) GetSubnetOnlyValidator ¶
func (m *MockState) GetSubnetOnlyValidator(validationID ids.ID) (SubnetOnlyValidator, error)
GetSubnetOnlyValidator 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) GetTimestamp ¶ added in v1.7.15
GetTimestamp mocks base method.
func (*MockState) HasExpiry ¶ added in v1.11.12
func (m *MockState) HasExpiry(arg0 ExpiryEntry) (bool, error)
HasExpiry mocks base method.
func (*MockState) HasSubnetOnlyValidator ¶
HasSubnetOnlyValidator mocks base method.
func (*MockState) NumActiveSubnetOnlyValidators ¶
NumActiveSubnetOnlyValidators 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) PutExpiry ¶ added in v1.11.12
func (m *MockState) PutExpiry(arg0 ExpiryEntry)
PutExpiry 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) PutSubnetOnlyValidator ¶
func (m *MockState) PutSubnetOnlyValidator(sov SubnetOnlyValidator) error
PutSubnetOnlyValidator mocks base method.
func (*MockState) ReindexBlocks ¶ added in v1.11.4
ReindexBlocks mocks base method.
func (*MockState) SetAccruedFees ¶ added in v1.11.12
SetAccruedFees 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) SetFeeState ¶ added in v1.11.11
SetFeeState mocks base method.
func (*MockState) SetLastAccepted ¶ added in v1.7.15
SetLastAccepted mocks base method.
func (*MockState) SetSoVExcess ¶
SetSoVExcess mocks base method.
func (*MockState) SetSubnetConversion ¶
SetSubnetConversion 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(nodeID ids.NodeID, upDuration time.Duration, lastUpdated time.Time) error
SetUptime 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(createChainTx any) *gomock.Call
AddChain indicates an expected call of AddChain.
func (*MockStateMockRecorder) AddRewardUTXO ¶ added in v1.7.15
func (mr *MockStateMockRecorder) AddRewardUTXO(txID, utxo any) *gomock.Call
AddRewardUTXO indicates an expected call of AddRewardUTXO.
func (*MockStateMockRecorder) AddStatelessBlock ¶ added in v1.7.17
func (mr *MockStateMockRecorder) AddStatelessBlock(block any) *gomock.Call
AddStatelessBlock indicates an expected call of AddStatelessBlock.
func (*MockStateMockRecorder) AddSubnet ¶ added in v1.7.15
func (mr *MockStateMockRecorder) AddSubnet(subnetID any) *gomock.Call
AddSubnet indicates an expected call of AddSubnet.
func (*MockStateMockRecorder) AddSubnetTransformation ¶ added in v1.8.0
func (mr *MockStateMockRecorder) AddSubnetTransformation(transformSubnetTx any) *gomock.Call
AddSubnetTransformation indicates an expected call of AddSubnetTransformation.
func (*MockStateMockRecorder) AddTx ¶ added in v1.7.15
func (mr *MockStateMockRecorder) AddTx(tx, status any) *gomock.Call
AddTx indicates an expected call of AddTx.
func (*MockStateMockRecorder) AddUTXO ¶ added in v1.7.15
func (mr *MockStateMockRecorder) AddUTXO(utxo any) *gomock.Call
AddUTXO indicates an expected call of AddUTXO.
func (*MockStateMockRecorder) ApplyValidatorPublicKeyDiffs ¶ added in v1.10.6
func (mr *MockStateMockRecorder) ApplyValidatorPublicKeyDiffs(ctx, validators, startHeight, endHeight, subnetID any) *gomock.Call
ApplyValidatorPublicKeyDiffs indicates an expected call of ApplyValidatorPublicKeyDiffs.
func (*MockStateMockRecorder) ApplyValidatorWeightDiffs ¶ added in v1.10.6
func (mr *MockStateMockRecorder) ApplyValidatorWeightDiffs(ctx, validators, startHeight, endHeight, subnetID any) *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(staker any) *gomock.Call
DeleteCurrentDelegator indicates an expected call of DeleteCurrentDelegator.
func (*MockStateMockRecorder) DeleteCurrentValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) DeleteCurrentValidator(staker any) *gomock.Call
DeleteCurrentValidator indicates an expected call of DeleteCurrentValidator.
func (*MockStateMockRecorder) DeleteExpiry ¶ added in v1.11.12
func (mr *MockStateMockRecorder) DeleteExpiry(arg0 any) *gomock.Call
DeleteExpiry indicates an expected call of DeleteExpiry.
func (*MockStateMockRecorder) DeletePendingDelegator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) DeletePendingDelegator(staker any) *gomock.Call
DeletePendingDelegator indicates an expected call of DeletePendingDelegator.
func (*MockStateMockRecorder) DeletePendingValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) DeletePendingValidator(staker any) *gomock.Call
DeletePendingValidator indicates an expected call of DeletePendingValidator.
func (*MockStateMockRecorder) DeleteUTXO ¶ added in v1.7.15
func (mr *MockStateMockRecorder) DeleteUTXO(utxoID any) *gomock.Call
DeleteUTXO indicates an expected call of DeleteUTXO.
func (*MockStateMockRecorder) GetAccruedFees ¶ added in v1.11.12
func (mr *MockStateMockRecorder) GetAccruedFees() *gomock.Call
GetAccruedFees indicates an expected call of GetAccruedFees.
func (*MockStateMockRecorder) GetActiveSubnetOnlyValidatorsIterator ¶
func (mr *MockStateMockRecorder) GetActiveSubnetOnlyValidatorsIterator() *gomock.Call
GetActiveSubnetOnlyValidatorsIterator indicates an expected call of GetActiveSubnetOnlyValidatorsIterator.
func (*MockStateMockRecorder) GetBlockIDAtHeight ¶ added in v1.10.8
func (mr *MockStateMockRecorder) GetBlockIDAtHeight(height any) *gomock.Call
GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.
func (*MockStateMockRecorder) GetChains ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetChains(subnetID any) *gomock.Call
GetChains indicates an expected call of GetChains.
func (*MockStateMockRecorder) GetCurrentDelegatorIterator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetCurrentDelegatorIterator(subnetID, nodeID any) *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(subnetID any) *gomock.Call
GetCurrentSupply indicates an expected call of GetCurrentSupply.
func (*MockStateMockRecorder) GetCurrentValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetCurrentValidator(subnetID, nodeID any) *gomock.Call
GetCurrentValidator indicates an expected call of GetCurrentValidator.
func (*MockStateMockRecorder) GetDelegateeReward ¶ added in v1.10.0
func (mr *MockStateMockRecorder) GetDelegateeReward(subnetID, nodeID any) *gomock.Call
GetDelegateeReward indicates an expected call of GetDelegateeReward.
func (*MockStateMockRecorder) GetExpiryIterator ¶ added in v1.11.12
func (mr *MockStateMockRecorder) GetExpiryIterator() *gomock.Call
GetExpiryIterator indicates an expected call of GetExpiryIterator.
func (*MockStateMockRecorder) GetFeeState ¶ added in v1.11.11
func (mr *MockStateMockRecorder) GetFeeState() *gomock.Call
GetFeeState indicates an expected call of GetFeeState.
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(subnetID, nodeID any) *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(subnetID, nodeID any) *gomock.Call
GetPendingValidator indicates an expected call of GetPendingValidator.
func (*MockStateMockRecorder) GetRewardUTXOs ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetRewardUTXOs(txID any) *gomock.Call
GetRewardUTXOs indicates an expected call of GetRewardUTXOs.
func (*MockStateMockRecorder) GetSoVExcess ¶
func (mr *MockStateMockRecorder) GetSoVExcess() *gomock.Call
GetSoVExcess indicates an expected call of GetSoVExcess.
func (*MockStateMockRecorder) GetStartTime ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetStartTime(nodeID any) *gomock.Call
GetStartTime indicates an expected call of GetStartTime.
func (*MockStateMockRecorder) GetStatelessBlock ¶ added in v1.7.17
func (mr *MockStateMockRecorder) GetStatelessBlock(blockID any) *gomock.Call
GetStatelessBlock indicates an expected call of GetStatelessBlock.
func (*MockStateMockRecorder) GetSubnetConversion ¶
func (mr *MockStateMockRecorder) GetSubnetConversion(subnetID any) *gomock.Call
GetSubnetConversion indicates an expected call of GetSubnetConversion.
func (*MockStateMockRecorder) GetSubnetIDs ¶ added in v1.11.7
func (mr *MockStateMockRecorder) GetSubnetIDs() *gomock.Call
GetSubnetIDs indicates an expected call of GetSubnetIDs.
func (*MockStateMockRecorder) GetSubnetOnlyValidator ¶
func (mr *MockStateMockRecorder) GetSubnetOnlyValidator(validationID any) *gomock.Call
GetSubnetOnlyValidator indicates an expected call of GetSubnetOnlyValidator.
func (*MockStateMockRecorder) GetSubnetOwner ¶ added in v1.10.10
func (mr *MockStateMockRecorder) GetSubnetOwner(subnetID any) *gomock.Call
GetSubnetOwner indicates an expected call of GetSubnetOwner.
func (*MockStateMockRecorder) GetSubnetTransformation ¶ added in v1.8.0
func (mr *MockStateMockRecorder) GetSubnetTransformation(subnetID any) *gomock.Call
GetSubnetTransformation indicates an expected call of GetSubnetTransformation.
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(txID any) *gomock.Call
GetTx indicates an expected call of GetTx.
func (*MockStateMockRecorder) GetUTXO ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetUTXO(utxoID any) *gomock.Call
GetUTXO indicates an expected call of GetUTXO.
func (*MockStateMockRecorder) GetUptime ¶ added in v1.7.15
func (mr *MockStateMockRecorder) GetUptime(nodeID any) *gomock.Call
GetUptime indicates an expected call of GetUptime.
func (*MockStateMockRecorder) HasExpiry ¶ added in v1.11.12
func (mr *MockStateMockRecorder) HasExpiry(arg0 any) *gomock.Call
HasExpiry indicates an expected call of HasExpiry.
func (*MockStateMockRecorder) HasSubnetOnlyValidator ¶
func (mr *MockStateMockRecorder) HasSubnetOnlyValidator(subnetID, nodeID any) *gomock.Call
HasSubnetOnlyValidator indicates an expected call of HasSubnetOnlyValidator.
func (*MockStateMockRecorder) NumActiveSubnetOnlyValidators ¶
func (mr *MockStateMockRecorder) NumActiveSubnetOnlyValidators() *gomock.Call
NumActiveSubnetOnlyValidators indicates an expected call of NumActiveSubnetOnlyValidators.
func (*MockStateMockRecorder) PutCurrentDelegator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) PutCurrentDelegator(staker any) *gomock.Call
PutCurrentDelegator indicates an expected call of PutCurrentDelegator.
func (*MockStateMockRecorder) PutCurrentValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) PutCurrentValidator(staker any) *gomock.Call
PutCurrentValidator indicates an expected call of PutCurrentValidator.
func (*MockStateMockRecorder) PutExpiry ¶ added in v1.11.12
func (mr *MockStateMockRecorder) PutExpiry(arg0 any) *gomock.Call
PutExpiry indicates an expected call of PutExpiry.
func (*MockStateMockRecorder) PutPendingDelegator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) PutPendingDelegator(staker any) *gomock.Call
PutPendingDelegator indicates an expected call of PutPendingDelegator.
func (*MockStateMockRecorder) PutPendingValidator ¶ added in v1.7.15
func (mr *MockStateMockRecorder) PutPendingValidator(staker any) *gomock.Call
PutPendingValidator indicates an expected call of PutPendingValidator.
func (*MockStateMockRecorder) PutSubnetOnlyValidator ¶
func (mr *MockStateMockRecorder) PutSubnetOnlyValidator(sov any) *gomock.Call
PutSubnetOnlyValidator indicates an expected call of PutSubnetOnlyValidator.
func (*MockStateMockRecorder) ReindexBlocks ¶ added in v1.11.4
func (mr *MockStateMockRecorder) ReindexBlocks(lock, log any) *gomock.Call
ReindexBlocks indicates an expected call of ReindexBlocks.
func (*MockStateMockRecorder) SetAccruedFees ¶ added in v1.11.12
func (mr *MockStateMockRecorder) SetAccruedFees(f any) *gomock.Call
SetAccruedFees indicates an expected call of SetAccruedFees.
func (*MockStateMockRecorder) SetCurrentSupply ¶ added in v1.7.15
func (mr *MockStateMockRecorder) SetCurrentSupply(subnetID, cs any) *gomock.Call
SetCurrentSupply indicates an expected call of SetCurrentSupply.
func (*MockStateMockRecorder) SetDelegateeReward ¶ added in v1.10.0
func (mr *MockStateMockRecorder) SetDelegateeReward(subnetID, nodeID, amount any) *gomock.Call
SetDelegateeReward indicates an expected call of SetDelegateeReward.
func (*MockStateMockRecorder) SetFeeState ¶ added in v1.11.11
func (mr *MockStateMockRecorder) SetFeeState(f any) *gomock.Call
SetFeeState indicates an expected call of SetFeeState.
func (*MockStateMockRecorder) SetHeight ¶ added in v1.7.17
func (mr *MockStateMockRecorder) SetHeight(height any) *gomock.Call
SetHeight indicates an expected call of SetHeight.
func (*MockStateMockRecorder) SetLastAccepted ¶ added in v1.7.15
func (mr *MockStateMockRecorder) SetLastAccepted(blkID any) *gomock.Call
SetLastAccepted indicates an expected call of SetLastAccepted.
func (*MockStateMockRecorder) SetSoVExcess ¶
func (mr *MockStateMockRecorder) SetSoVExcess(e any) *gomock.Call
SetSoVExcess indicates an expected call of SetSoVExcess.
func (*MockStateMockRecorder) SetSubnetConversion ¶
func (mr *MockStateMockRecorder) SetSubnetConversion(subnetID, conversionID, chainID, addr any) *gomock.Call
SetSubnetConversion indicates an expected call of SetSubnetConversion.
func (*MockStateMockRecorder) SetSubnetOwner ¶ added in v1.10.12
func (mr *MockStateMockRecorder) SetSubnetOwner(subnetID, owner any) *gomock.Call
SetSubnetOwner indicates an expected call of SetSubnetOwner.
func (*MockStateMockRecorder) SetTimestamp ¶ added in v1.7.15
func (mr *MockStateMockRecorder) SetTimestamp(tm any) *gomock.Call
SetTimestamp indicates an expected call of SetTimestamp.
func (*MockStateMockRecorder) SetUptime ¶ added in v1.7.15
func (mr *MockStateMockRecorder) SetUptime(nodeID, upDuration, lastUpdated any) *gomock.Call
SetUptime indicates an expected call of SetUptime.
func (*MockStateMockRecorder) UTXOIDs ¶ added in v1.7.15
func (mr *MockStateMockRecorder) UTXOIDs(addr, previous, limit any) *gomock.Call
UTXOIDs indicates an expected call of UTXOIDs.
func (*MockStateMockRecorder) WeightOfSubnetOnlyValidators ¶
func (mr *MockStateMockRecorder) WeightOfSubnetOnlyValidators(subnetID any) *gomock.Call
WeightOfSubnetOnlyValidators indicates an expected call of WeightOfSubnetOnlyValidators.
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) error // 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) (iterator.Iterator[*Staker], 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() (iterator.Iterator[*Staker], 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 iterator.Iterator[*Staker]) StakerDiffIterator
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) GetRewardUTXOs(txID ids.ID) ([]*avax.UTXO, error) GetSubnetIDs() ([]ids.ID, error) GetChains(subnetID ids.ID) ([]*txs.Tx, 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, subnetID ids.ID, ) error SetHeight(height uint64) // Discard uncommitted changes to the database. Abort() // ReindexBlocks converts any block indices using the legacy storage format // to the new format. If this database has already updated the indices, // this function will return immediately, without iterating over the // database. // // TODO: Remove after v1.12.x is activated ReindexBlocks(lock sync.Locker, log 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, upgrades upgrade.Config, execCfg *config.ExecutionConfig, ctx *snow.Context, metrics metrics.Metrics, rewards reward.Calculator, ) (State, error)
type SubnetOnlyValidator ¶ added in v1.11.12
type SubnetOnlyValidator struct { // ValidationID is not serialized because it is used as the key in the // database, so it doesn't need to be stored in the value. ValidationID ids.ID SubnetID ids.ID `serialize:"true"` NodeID ids.NodeID `serialize:"true"` // PublicKey is the uncompressed BLS public key of the validator. It is // guaranteed to be populated. PublicKey []byte `serialize:"true"` // RemainingBalanceOwner is the owner that will be used when returning the // balance of the validator after removing accrued fees. RemainingBalanceOwner []byte `serialize:"true"` // DeactivationOwner is the owner that can manually deactivate the // validator. DeactivationOwner []byte `serialize:"true"` // StartTime is the unix timestamp, in seconds, when this validator was // added to the set. StartTime uint64 `serialize:"true"` // Weight of this validator. It can be updated when the MinNonce is // increased. If the weight is being set to 0, the validator is being // removed. Weight uint64 `serialize:"true"` // MinNonce is the smallest nonce that can be used to modify this // validator's weight. It is initially set to 0 and is set to one higher // than the last nonce used. It is not valid to use nonce MaxUint64 unless // the weight is being set to 0, which removes the validator from the set. MinNonce uint64 `serialize:"true"` // EndAccumulatedFee is the amount of globally accumulated fees that can // accrue before this validator must be deactivated. It is equal to the // amount of fees this validator is willing to pay plus the amount of // globally accumulated fees when this validator started validating. // // If this value is 0, the validator is inactive. EndAccumulatedFee uint64 `serialize:"true"` }
SubnetOnlyValidator defines an ACP-77 validator. For a given ValidationID, it is expected for SubnetID, NodeID, PublicKey, RemainingBalanceOwner, and StartTime to be constant.
func (SubnetOnlyValidator) Compare ¶
func (v SubnetOnlyValidator) Compare(o SubnetOnlyValidator) int
Compare determines a canonical ordering of *SubnetOnlyValidators based on their EndAccumulatedFees and ValidationIDs. Lower EndAccumulatedFees result in an earlier ordering.
func (SubnetOnlyValidator) Less ¶ added in v1.11.12
func (v SubnetOnlyValidator) Less(o SubnetOnlyValidator) bool
type SubnetOnlyValidators ¶
type SubnetOnlyValidators interface { // GetActiveSubnetOnlyValidatorsIterator returns an iterator of all the // active subnet only validators in increasing order of EndAccumulatedFee. GetActiveSubnetOnlyValidatorsIterator() (iterator.Iterator[SubnetOnlyValidator], error) // NumActiveSubnetOnlyValidators returns the number of currently active // subnet only validators. NumActiveSubnetOnlyValidators() int // WeightOfSubnetOnlyValidators returns the total active and inactive weight // of subnet only validators on [subnetID]. WeightOfSubnetOnlyValidators(subnetID ids.ID) (uint64, error) // GetSubnetOnlyValidator returns the validator with [validationID] if it // exists. If the validator does not exist, [err] will equal // [database.ErrNotFound]. GetSubnetOnlyValidator(validationID ids.ID) (SubnetOnlyValidator, error) // HasSubnetOnlyValidator returns the validator with [validationID] if it // exists. HasSubnetOnlyValidator(subnetID ids.ID, nodeID ids.NodeID) (bool, error) // PutSubnetOnlyValidator inserts [sov] as a validator. // // If inserting this validator attempts to modify any of the constant fields // of the subnet only validator struct, an error will be returned. // // If inserting this validator would cause the mapping of subnetID+nodeID to // validationID to be non-unique, an error will be returned. PutSubnetOnlyValidator(sov SubnetOnlyValidator) error }