Documentation ¶
Index ¶
- func AvailablePlasma(momentum store.Momentum, account store.Account) (uint64, error)
- func DifficultyToPlasma(difficulty uint64) uint64
- func FussedAmountToPlasma(amount *big.Int) uint64
- func GetBasePlasmaForAccountBlock(context vm_context.AccountVmContext, block *nom.AccountBlock) (uint64, error)
- func GetDifficultyForPlasma(requiredPlasma uint64) (uint64, error)
- type ContractExecution
- type MomentumVM
- type SignFunc
- type Supervisor
- func (s *Supervisor) ApplyBlock(block *nom.AccountBlock) (*nom.AccountBlockTransaction, error)
- func (s *Supervisor) ApplyMomentum(detailed *nom.DetailedMomentum) (result *nom.MomentumTransaction, internalErr error)
- func (s *Supervisor) GenerateAutoReceive(sendBlock *nom.AccountBlock) (*ContractExecution, error)
- func (s *Supervisor) GenerateFromTemplate(template *nom.AccountBlock, signFunc SignFunc) (*nom.AccountBlockTransaction, error)
- func (s *Supervisor) GenerateGenesisMomentum(template *nom.Momentum, pool chain.AccountPool) (result *nom.MomentumTransaction, internalErr error)
- func (s *Supervisor) GenerateMomentum(detailed *nom.DetailedMomentum, signFunc SignFunc) (result *nom.MomentumTransaction, internalErr error)
- type VM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailablePlasma ¶
AvailablePlasma returns only the total amount of plasma available. *Takes* into consideration used plasma by unconfirmed blocks.
Plasma equals to fusedPlasma - plasmaUsedByUnconfirmedBlocks
func DifficultyToPlasma ¶
func FussedAmountToPlasma ¶
func GetBasePlasmaForAccountBlock ¶
func GetBasePlasmaForAccountBlock(context vm_context.AccountVmContext, block *nom.AccountBlock) (uint64, error)
GetBasePlasmaForAccountBlock calculates the smallest plasma required for an account block.
func GetDifficultyForPlasma ¶
Types ¶
type ContractExecution ¶
type ContractExecution struct { Transaction *nom.AccountBlockTransaction ReturnedError error }
type MomentumVM ¶
type MomentumVM struct {
// contains filtered or unexported fields
}
func NewMomentumVM ¶
func NewMomentumVM(context vm_context.MomentumVMContext) *MomentumVM
type SignFunc ¶
SignFunc is the function type defining the callback when a block requires a method to sign the transaction in supervisor
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
func NewSupervisor ¶
func NewSupervisor(chain chain.Chain, consensus consensus.Consensus) *Supervisor
func (*Supervisor) ApplyBlock ¶
func (s *Supervisor) ApplyBlock(block *nom.AccountBlock) (*nom.AccountBlockTransaction, error)
func (*Supervisor) ApplyMomentum ¶
func (s *Supervisor) ApplyMomentum(detailed *nom.DetailedMomentum) (result *nom.MomentumTransaction, internalErr error)
func (*Supervisor) GenerateAutoReceive ¶
func (s *Supervisor) GenerateAutoReceive(sendBlock *nom.AccountBlock) (*ContractExecution, error)
func (*Supervisor) GenerateFromTemplate ¶
func (s *Supervisor) GenerateFromTemplate(template *nom.AccountBlock, signFunc SignFunc) (*nom.AccountBlockTransaction, error)
func (*Supervisor) GenerateGenesisMomentum ¶
func (s *Supervisor) GenerateGenesisMomentum(template *nom.Momentum, pool chain.AccountPool) (result *nom.MomentumTransaction, internalErr error)
func (*Supervisor) GenerateMomentum ¶
func (s *Supervisor) GenerateMomentum(detailed *nom.DetailedMomentum, signFunc SignFunc) (result *nom.MomentumTransaction, internalErr error)
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
func NewVM ¶
func NewVM(context vm_context.AccountVmContext) *VM
Click to show internal directories.
Click to hide internal directories.