Documentation ¶
Index ¶
- Constants
- Variables
- func CalcMinRewardTime(registration *types.Registration, genesisTime int64, periodTime uint64) int64
- func CalcReward(db vmctxt_interface.VmDatabase, old *types.Registration, gid types.Gid) (uint64, uint64, *big.Int, uint64, error)
- func CheckCreateConsensusGroupData(db vmctxt_interface.VmDatabase, param *types.ConsensusGroupInfo) error
- func CheckToken(param cabi.ParamMintage) error
- func IndexToTime(index uint64, genesisTime int64, periodTime uint64) int64
- func InitContractsConfig(isTestParam bool)
- func IsExistGid(db vmctxt_interface.VmDatabase, gid types.Gid) bool
- type ContractsParams
- type MethodCancelConsensusGroup
- func (p *MethodCancelConsensusGroup) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodCancelConsensusGroup) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodCancelConsensusGroup) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodCancelConsensusGroup) GetQuota() uint64
- func (p *MethodCancelConsensusGroup) GetRefundData() []byte
- type MethodCancelPledge
- func (p *MethodCancelPledge) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodCancelPledge) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodCancelPledge) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodCancelPledge) GetQuota() uint64
- func (p *MethodCancelPledge) GetRefundData() []byte
- type MethodCancelRegister
- func (p *MethodCancelRegister) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodCancelRegister) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodCancelRegister) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodCancelRegister) GetQuota() uint64
- func (p *MethodCancelRegister) GetRefundData() []byte
- type MethodCancelVote
- func (p *MethodCancelVote) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodCancelVote) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodCancelVote) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodCancelVote) GetQuota() uint64
- func (p *MethodCancelVote) GetRefundData() []byte
- type MethodCreateConsensusGroup
- func (p *MethodCreateConsensusGroup) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodCreateConsensusGroup) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodCreateConsensusGroup) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodCreateConsensusGroup) GetQuota() uint64
- func (p *MethodCreateConsensusGroup) GetRefundData() []byte
- type MethodMintage
- func (p *MethodMintage) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodMintage) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodMintage) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodMintage) GetQuota() uint64
- func (p *MethodMintage) GetRefundData() []byte
- type MethodMintageCancelPledge
- func (p *MethodMintageCancelPledge) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodMintageCancelPledge) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodMintageCancelPledge) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodMintageCancelPledge) GetQuota() uint64
- func (p *MethodMintageCancelPledge) GetRefundData() []byte
- type MethodPledge
- func (p *MethodPledge) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodPledge) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodPledge) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodPledge) GetQuota() uint64
- func (p *MethodPledge) GetRefundData() []byte
- type MethodReCreateConsensusGroup
- func (p *MethodReCreateConsensusGroup) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodReCreateConsensusGroup) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodReCreateConsensusGroup) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodReCreateConsensusGroup) GetQuota() uint64
- func (p *MethodReCreateConsensusGroup) GetRefundData() []byte
- type MethodRegister
- func (p *MethodRegister) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodRegister) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodRegister) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodRegister) GetQuota() uint64
- func (p *MethodRegister) GetRefundData() []byte
- type MethodReward
- func (p *MethodReward) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodReward) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodReward) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodReward) GetQuota() uint64
- func (p *MethodReward) GetRefundData() []byte
- type MethodUpdateRegistration
- func (p *MethodUpdateRegistration) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodUpdateRegistration) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodUpdateRegistration) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodUpdateRegistration) GetQuota() uint64
- func (p *MethodUpdateRegistration) GetRefundData() []byte
- type MethodVote
- func (p *MethodVote) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, ...) ([]*SendBlock, error)
- func (p *MethodVote) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
- func (p *MethodVote) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
- func (p *MethodVote) GetQuota() uint64
- func (p *MethodVote) GetRefundData() []byte
- type NodeConfig
- type PrecompiledContractMethod
- type SendBlock
Constants ¶
const ( RegisterGas uint64 = 62200 UpdateRegistrationGas uint64 = 62200 CancelRegisterGas uint64 = 83200 RewardGas uint64 = 238800 VoteGas uint64 = 62000 CancelVoteGas uint64 = 62000 PledgeGas uint64 = 21000 CancelPledgeGas uint64 = 21000 CreateConsensusGroupGas uint64 = 62200 CancelConsensusGroupGas uint64 = 83200 ReCreateConsensusGroupGas uint64 = 62200 MintageGas uint64 = 83200 MintageCancelPledgeGas uint64 = 83200 RewardDayLimit uint64 = 90 )
Variables ¶
var ( ContractsParamsTest = ContractsParams{ MinPledgeHeight: 1, CreateConsensusGroupPledgeHeight: 1, MintagePledgeHeight: 1, RewardEndTimeLimit: 75, RewardTimeUnit: 75 * 2, } ContractsParamsMainNet = ContractsParams{ MinPledgeHeight: 3600 * 24 * 3, CreateConsensusGroupPledgeHeight: 3600 * 24 * 3, MintagePledgeHeight: 3600 * 24 * 30 * 3, RewardEndTimeLimit: 3600 * 24, RewardTimeUnit: 1152 * 75, } )
var SimpleCountingRuleList = map[cabi.ConditionCode]createConsensusGroupCondition{ cabi.RegisterConditionOfPledge: ®isterConditionOfPledge{}, cabi.VoteConditionOfDefault: &voteConditionOfDefault{}, cabi.VoteConditionOfBalance: &voteConditionOfKeepToken{}, }
Functions ¶
func CalcMinRewardTime ¶
func CalcMinRewardTime(registration *types.Registration, genesisTime int64, periodTime uint64) int64
func CalcReward ¶
func CalcReward(db vmctxt_interface.VmDatabase, old *types.Registration, gid types.Gid) (uint64, uint64, *big.Int, uint64, error)
func CheckCreateConsensusGroupData ¶
func CheckCreateConsensusGroupData(db vmctxt_interface.VmDatabase, param *types.ConsensusGroupInfo) error
func CheckToken ¶
func CheckToken(param cabi.ParamMintage) error
func IsExistGid ¶
func IsExistGid(db vmctxt_interface.VmDatabase, gid types.Gid) bool
Types ¶
type ContractsParams ¶
type ContractsParams struct { MinPledgeHeight uint64 // Minimum pledge height CreateConsensusGroupPledgeHeight uint64 // Pledge height for registering to be a super node of snapshot group and common delegate group MintagePledgeHeight uint64 // Pledge height for mintage if choose to pledge instead of destroy vite token RewardEndTimeLimit uint64 // Cannot get snapshot block reward of current few blocks, for latest snapshot block could be reverted RewardTimeUnit uint64 }
type MethodCancelConsensusGroup ¶
type MethodCancelConsensusGroup struct{}
func (*MethodCancelConsensusGroup) DoReceive ¶
func (p *MethodCancelConsensusGroup) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodCancelConsensusGroup) DoSend ¶
func (p *MethodCancelConsensusGroup) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
Cancel consensus group and get pledge back. A canceled consensus group(no-active) will not generate contract blocks after cancel receive block is confirmed. Consensus group name is kept even if canceled.
func (*MethodCancelConsensusGroup) GetFee ¶
func (p *MethodCancelConsensusGroup) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodCancelConsensusGroup) GetQuota ¶ added in v1.3.0
func (p *MethodCancelConsensusGroup) GetQuota() uint64
func (*MethodCancelConsensusGroup) GetRefundData ¶
func (p *MethodCancelConsensusGroup) GetRefundData() []byte
type MethodCancelPledge ¶
type MethodCancelPledge struct{}
func (*MethodCancelPledge) DoReceive ¶
func (p *MethodCancelPledge) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodCancelPledge) DoSend ¶
func (p *MethodCancelPledge) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
cancel pledge ViteToken
func (*MethodCancelPledge) GetFee ¶
func (p *MethodCancelPledge) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodCancelPledge) GetQuota ¶ added in v1.3.0
func (p *MethodCancelPledge) GetQuota() uint64
func (*MethodCancelPledge) GetRefundData ¶
func (p *MethodCancelPledge) GetRefundData() []byte
type MethodCancelRegister ¶
type MethodCancelRegister struct { }
func (*MethodCancelRegister) DoReceive ¶
func (p *MethodCancelRegister) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodCancelRegister) DoSend ¶
func (p *MethodCancelRegister) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
cancel register to become a super node of a consensus group after registered for 3 month, get 100w ViteToken back
func (*MethodCancelRegister) GetFee ¶
func (p *MethodCancelRegister) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodCancelRegister) GetQuota ¶ added in v1.3.0
func (p *MethodCancelRegister) GetQuota() uint64
func (*MethodCancelRegister) GetRefundData ¶
func (p *MethodCancelRegister) GetRefundData() []byte
type MethodCancelVote ¶
type MethodCancelVote struct { }
func (*MethodCancelVote) DoReceive ¶
func (p *MethodCancelVote) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodCancelVote) DoSend ¶
func (p *MethodCancelVote) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
cancel vote for a super node of a consensus group
func (*MethodCancelVote) GetFee ¶
func (p *MethodCancelVote) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodCancelVote) GetQuota ¶ added in v1.3.0
func (p *MethodCancelVote) GetQuota() uint64
func (*MethodCancelVote) GetRefundData ¶
func (p *MethodCancelVote) GetRefundData() []byte
type MethodCreateConsensusGroup ¶
type MethodCreateConsensusGroup struct{}
func (*MethodCreateConsensusGroup) DoReceive ¶
func (p *MethodCreateConsensusGroup) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodCreateConsensusGroup) DoSend ¶
func (p *MethodCreateConsensusGroup) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
func (*MethodCreateConsensusGroup) GetFee ¶
func (p *MethodCreateConsensusGroup) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodCreateConsensusGroup) GetQuota ¶ added in v1.3.0
func (p *MethodCreateConsensusGroup) GetQuota() uint64
func (*MethodCreateConsensusGroup) GetRefundData ¶
func (p *MethodCreateConsensusGroup) GetRefundData() []byte
type MethodMintage ¶
type MethodMintage struct{}
func (*MethodMintage) DoReceive ¶
func (p *MethodMintage) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodMintage) DoSend ¶
func (p *MethodMintage) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
func (*MethodMintage) GetFee ¶
func (p *MethodMintage) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodMintage) GetQuota ¶ added in v1.3.0
func (p *MethodMintage) GetQuota() uint64
func (*MethodMintage) GetRefundData ¶
func (p *MethodMintage) GetRefundData() []byte
type MethodMintageCancelPledge ¶
type MethodMintageCancelPledge struct{}
func (*MethodMintageCancelPledge) DoReceive ¶
func (p *MethodMintageCancelPledge) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodMintageCancelPledge) DoSend ¶
func (p *MethodMintageCancelPledge) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
func (*MethodMintageCancelPledge) GetFee ¶
func (p *MethodMintageCancelPledge) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodMintageCancelPledge) GetQuota ¶ added in v1.3.0
func (p *MethodMintageCancelPledge) GetQuota() uint64
func (*MethodMintageCancelPledge) GetRefundData ¶
func (p *MethodMintageCancelPledge) GetRefundData() []byte
type MethodPledge ¶
type MethodPledge struct{}
func (*MethodPledge) DoReceive ¶
func (p *MethodPledge) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodPledge) DoSend ¶
func (p *MethodPledge) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
pledge ViteToken for a beneficial to get quota
func (*MethodPledge) GetFee ¶
func (p *MethodPledge) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodPledge) GetQuota ¶ added in v1.3.0
func (p *MethodPledge) GetQuota() uint64
func (*MethodPledge) GetRefundData ¶
func (p *MethodPledge) GetRefundData() []byte
type MethodReCreateConsensusGroup ¶
type MethodReCreateConsensusGroup struct{}
func (*MethodReCreateConsensusGroup) DoReceive ¶
func (p *MethodReCreateConsensusGroup) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodReCreateConsensusGroup) DoSend ¶
func (p *MethodReCreateConsensusGroup) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
Pledge again for a canceled consensus group. A consensus group will start generate contract blocks after recreate receive block is confirmed.
func (*MethodReCreateConsensusGroup) GetFee ¶
func (p *MethodReCreateConsensusGroup) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodReCreateConsensusGroup) GetQuota ¶ added in v1.3.0
func (p *MethodReCreateConsensusGroup) GetQuota() uint64
func (*MethodReCreateConsensusGroup) GetRefundData ¶
func (p *MethodReCreateConsensusGroup) GetRefundData() []byte
type MethodRegister ¶
type MethodRegister struct { }
func (*MethodRegister) DoReceive ¶
func (p *MethodRegister) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodRegister) DoSend ¶
func (p *MethodRegister) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
register to become a super node of a consensus group, lock 1 million ViteToken for 3 month
func (*MethodRegister) GetFee ¶
func (p *MethodRegister) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodRegister) GetQuota ¶ added in v1.3.0
func (p *MethodRegister) GetQuota() uint64
func (*MethodRegister) GetRefundData ¶
func (p *MethodRegister) GetRefundData() []byte
type MethodReward ¶
type MethodReward struct { }
func (*MethodReward) DoReceive ¶
func (p *MethodReward) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodReward) DoSend ¶
func (p *MethodReward) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
get reward of generating snapshot block
func (*MethodReward) GetFee ¶
func (p *MethodReward) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodReward) GetQuota ¶ added in v1.3.0
func (p *MethodReward) GetQuota() uint64
func (*MethodReward) GetRefundData ¶
func (p *MethodReward) GetRefundData() []byte
type MethodUpdateRegistration ¶
type MethodUpdateRegistration struct { }
func (*MethodUpdateRegistration) DoReceive ¶
func (p *MethodUpdateRegistration) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodUpdateRegistration) DoSend ¶
func (p *MethodUpdateRegistration) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
update registration info
func (*MethodUpdateRegistration) GetFee ¶
func (p *MethodUpdateRegistration) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodUpdateRegistration) GetQuota ¶ added in v1.3.0
func (p *MethodUpdateRegistration) GetQuota() uint64
func (*MethodUpdateRegistration) GetRefundData ¶
func (p *MethodUpdateRegistration) GetRefundData() []byte
type MethodVote ¶
type MethodVote struct { }
func (*MethodVote) DoReceive ¶
func (p *MethodVote) DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error)
func (*MethodVote) DoSend ¶
func (p *MethodVote) DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error)
vote for a super node of a consensus group
func (*MethodVote) GetFee ¶
func (p *MethodVote) GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error)
func (*MethodVote) GetQuota ¶ added in v1.3.0
func (p *MethodVote) GetQuota() uint64
func (*MethodVote) GetRefundData ¶
func (p *MethodVote) GetRefundData() []byte
type NodeConfig ¶
type NodeConfig struct {
// contains filtered or unexported fields
}
type PrecompiledContractMethod ¶
type PrecompiledContractMethod interface { GetFee(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock) (*big.Int, error) // calc and use quota, check tx data DoSend(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, quotaLeft uint64) (uint64, error) // check status, update state DoReceive(db vmctxt_interface.VmDatabase, block *ledger.AccountBlock, sendBlock *ledger.AccountBlock) ([]*SendBlock, error) // refund data at receive error GetRefundData() []byte GetQuota() uint64 }