state

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MinDepositAmount is the minimum deposit as a producer.
	MinDepositAmount = 5000 * 100000000

	// ActivateDuration is about how long we should activate from pending or
	// inactive state.
	ActivateDuration = 6
)
View Source
const CRAssetsRectifyInterval = time.Minute
View Source
const (

	// EffectiveHeight defines interval to change src file to default file.
	EffectiveHeight = uint32(7)
)

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.

func UseLogger

func UseLogger(logger elalog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using elalog.

Types

type BudgetStatus

type BudgetStatus uint8
const (
	// Unfinished indicates the proposal owner haven't started or uploaded the
	// status of the budget to CR Council.
	Unfinished BudgetStatus = iota

	// Withdrawable indicates the proposal owner have finished the milestone,
	// but haven't get the payment.
	Withdrawable

	// Withdrawn indicates the proposal owner have finished the milestone and
	// got the payment.
	Withdrawn

	// Rejected indicates the proposal owner have uploaded the status to CR
	// Council but the secretary-general rejected my request.
	Rejected

	// Closed indicates the proposal has been terminated and the milestone will
	// not be finished forever.
	Closed
)

func (*BudgetStatus) Name

func (s *BudgetStatus) Name() string

type CRMember

type CRMember struct {
	Info                   payload.CRInfo
	ImpeachmentVotes       common.Fixed64
	DepositHash            common.Uint168
	MemberState            MemberState
	DPOSPublicKey          []byte
	InactiveSince          uint32
	ActivateRequestHeight  uint32
	PenaltyBlockCount      uint32
	InactiveCount          uint32
	InactiveCountingHeight uint32
}

CRMember defines CR committee member related info.

func (*CRMember) Deserialize

func (c *CRMember) Deserialize(r io.Reader) (err error)

func (*CRMember) Serialize

func (c *CRMember) Serialize(w io.Writer) (err error)

type Candidate

type Candidate struct {
	// contains filtered or unexported fields
}

Candidate defines information about CR candidates during the CR vote period

func (*Candidate) CancelHeight

func (c *Candidate) CancelHeight() uint32

RegisterHeight returns the height when the CR was unregistered.

func (*Candidate) Deserialize

func (c *Candidate) Deserialize(r io.Reader) (err error)

func (*Candidate) Info

func (c *Candidate) Info() payload.CRInfo

Info returns a copy of the origin registered CR info.

func (*Candidate) RegisterHeight

func (c *Candidate) RegisterHeight() uint32

RegisterHeight returns the height when the CR was registered.

func (*Candidate) Serialize

func (c *Candidate) Serialize(w io.Writer) (err error)

func (*Candidate) State

func (c *Candidate) State() CandidateState

State returns the CR's state, can be pending, active, canceled or returned.

func (*Candidate) Votes

func (c *Candidate) Votes() common.Fixed64

Votes returns the votes of the CR.

type CandidateState

type CandidateState byte

CandidateState defines states during a CR candidates lifetime

const (
	// Pending indicates the producer is just registered and didn't get 6
	// confirmations yet.
	Pending CandidateState = iota

	// Active indicates the CR is registered and confirmed by more than
	// 6 blocks.
	Active

	// Canceled indicates the CR was canceled.
	Canceled

	// Returned indicates the CR has canceled and deposit returned.
	Returned
)

func (CandidateState) String

func (ps CandidateState) String() string

type Checkpoint

type Checkpoint struct {
	KeyFrame
	StateKeyFrame
	ProposalKeyFrame
	// contains filtered or unexported fields
}

Checkpoint hold all CR related states to recover from scratch.

func NewCheckpoint

func NewCheckpoint(committee *Committee) *Checkpoint

func (*Checkpoint) DataExtension

func (c *Checkpoint) DataExtension() string

func (*Checkpoint) Deserialize

func (c *Checkpoint) Deserialize(r io.Reader) (err error)

func (*Checkpoint) EffectivePeriod

func (c *Checkpoint) EffectivePeriod() uint32

func (*Checkpoint) Generator

func (c *Checkpoint) Generator() func(buf []byte) checkpoint.ICheckPoint

func (*Checkpoint) GetHeight

func (c *Checkpoint) GetHeight() uint32

func (*Checkpoint) Key

func (c *Checkpoint) Key() string

func (*Checkpoint) LogError

func (c *Checkpoint) LogError(err error)

func (*Checkpoint) OnBlockSaved

func (c *Checkpoint) OnBlockSaved(block *types.DposBlock)

func (*Checkpoint) OnInit

func (c *Checkpoint) OnInit()

func (*Checkpoint) OnRollbackSeekTo added in v0.8.0

func (c *Checkpoint) OnRollbackSeekTo(height uint32)

func (*Checkpoint) OnRollbackTo

func (c *Checkpoint) OnRollbackTo(height uint32) error

func (*Checkpoint) Priority

func (c *Checkpoint) Priority() checkpoint.Priority

func (*Checkpoint) SavePeriod

func (c *Checkpoint) SavePeriod() uint32

func (*Checkpoint) Serialize

func (c *Checkpoint) Serialize(w io.Writer) (err error)

func (*Checkpoint) SetHeight

func (c *Checkpoint) SetHeight(height uint32)

func (*Checkpoint) Snapshot

func (c *Checkpoint) Snapshot() checkpoint.ICheckPoint

func (*Checkpoint) StartHeight

func (c *Checkpoint) StartHeight() uint32

type Committee

type Committee struct {
	KeyFrame
	// contains filtered or unexported fields
}

func NewCommittee

func NewCommittee(params *config.Params) *Committee

func (*Committee) AvailableWithdrawalAmount

func (c *Committee) AvailableWithdrawalAmount(hash common.Uint256) common.Fixed64

func (*Committee) Exist

func (c *Committee) Exist(cid common.Uint168) bool

func (*Committee) ExistCR

func (c *Committee) ExistCR(programCode []byte) bool

func (*Committee) ExistCandidateByDepositHash

func (c *Committee) ExistCandidateByDepositHash(hash common.Uint168) bool

func (*Committee) ExistCandidateByNickname

func (c *Committee) ExistCandidateByNickname(nickname string) bool

func (*Committee) ExistDraft

func (c *Committee) ExistDraft(hash common.Uint256) bool

func (*Committee) ExistProposal

func (c *Committee) ExistProposal(hash common.Uint256) bool

func (*Committee) GetAllCandidates

func (c *Committee) GetAllCandidates() []*Candidate

func (*Committee) GetAllMembers

func (c *Committee) GetAllMembers() []*CRMember

get all CRMembers ordered by CID

func (*Committee) GetAllMembersCopy added in v0.7.0

func (c *Committee) GetAllMembersCopy() []*CRMember

copy all CRMembers ordered by CID

func (*Committee) GetAllProposals

func (c *Committee) GetAllProposals() ProposalsMap

func (*Committee) GetAllRegisteredSideChain added in v0.8.0

func (c *Committee) GetAllRegisteredSideChain() map[uint32]map[common.Uint256]payload.SideChainInfo

func (*Committee) GetAvailableDepositAmount

func (c *Committee) GetAvailableDepositAmount(cid common.Uint168) common.Fixed64

func (*Committee) GetCROnDutyPeriod added in v0.7.0

func (c *Committee) GetCROnDutyPeriod() uint32

func (*Committee) GetCROnDutyStartHeight added in v0.7.0

func (c *Committee) GetCROnDutyStartHeight() uint32

func (*Committee) GetCRVotingPeriod added in v0.7.0

func (c *Committee) GetCRVotingPeriod() uint32

func (*Committee) GetCRVotingStartHeight added in v0.7.0

func (c *Committee) GetCRVotingStartHeight() uint32

func (*Committee) GetCandidate

func (c *Committee) GetCandidate(cid common.Uint168) *Candidate

func (*Committee) GetCandidateByCID

func (c *Committee) GetCandidateByCID(cid common.Uint168) *Candidate

GetCandidateByCID returns candidate with specified cid, it will return nil if not found.

func (*Committee) GetCandidateByID

func (c *Committee) GetCandidateByID(id common.Uint168) *Candidate

GetCandidateByID returns candidate with specified cid or did, it will return nil if not found.

func (*Committee) GetCandidateByPublicKey

func (c *Committee) GetCandidateByPublicKey(publicKey string) *Candidate

GetCandidateByPublicKey returns candidate with specified public key, it will return nil if not found.

func (*Committee) GetCandidates

func (c *Committee) GetCandidates(state CandidateState) []*Candidate

func (*Committee) GetCommitteeCanUseAmount added in v0.7.0

func (c *Committee) GetCommitteeCanUseAmount() common.Fixed64

func (*Committee) GetCustomIDResults added in v0.7.0

func (c *Committee) GetCustomIDResults() []payload.ProposalResult

func (*Committee) GetDepositAmountByID

func (c *Committee) GetDepositAmountByID(
	id common.Uint168) (common.Fixed64, common.Fixed64, common.Fixed64, common.Fixed64, error)

func (*Committee) GetDepositAmountByPublicKey

func (c *Committee) GetDepositAmountByPublicKey(
	publicKey string) (common.Fixed64, common.Fixed64, common.Fixed64, common.Fixed64, error)

func (*Committee) GetElectedMembers

func (c *Committee) GetElectedMembers() []*CRMember

get all elected CRMembers

func (*Committee) GetImpeachableMembers

func (c *Committee) GetImpeachableMembers() []*CRMember

get all impeachable CRMembers

func (*Committee) GetMember

func (c *Committee) GetMember(did common.Uint168) *CRMember

func (*Committee) GetMemberByNodePublicKey added in v0.7.0

func (c *Committee) GetMemberByNodePublicKey(nodePK []byte) *CRMember

func (*Committee) GetMembersCodes

func (c *Committee) GetMembersCodes() [][]byte

func (*Committee) GetMembersDIDs

func (c *Committee) GetMembersDIDs() []common.Uint168

func (*Committee) GetPenalty

func (c *Committee) GetPenalty(cid common.Uint168) common.Fixed64

func (*Committee) GetPendingReceivedCustomIDMap added in v0.7.0

func (c *Committee) GetPendingReceivedCustomIDMap() map[string]struct{}

func (*Committee) GetProposal

func (c *Committee) GetProposal(hash common.Uint256) *ProposalState

func (*Committee) GetProposalByDraftHash

func (c *Committee) GetProposalByDraftHash(draftHash common.Uint256) *ProposalState

func (*Committee) GetProposalManager deprecated

func (c *Committee) GetProposalManager() *ProposalManager

Deprecated: just for testing

func (*Committee) GetProposals

func (c *Committee) GetProposals(status ProposalStatus) ProposalsMap

func (*Committee) GetRealWithdrawTransactions added in v0.7.0

func (c *Committee) GetRealWithdrawTransactions() map[common.Uint256]types.OutputInfo

func (*Committee) GetReceivedCustomIDLists added in v0.7.0

func (c *Committee) GetReceivedCustomIDLists() []string

func (*Committee) GetRegisteredSideChainByHeight added in v0.8.0

func (c *Committee) GetRegisteredSideChainByHeight(height uint32) map[common.Uint256]payload.SideChainInfo

func (*Committee) GetReservedCustomIDLists added in v0.7.0

func (c *Committee) GetReservedCustomIDLists() []string

func (*Committee) GetState deprecated

func (c *Committee) GetState() *State

Deprecated: just for testing

func (*Committee) IsAppropriationNeeded

func (c *Committee) IsAppropriationNeeded() bool

func (*Committee) IsCRMember

func (c *Committee) IsCRMember(programCode []byte) bool

func (*Committee) IsCRMemberByDID

func (c *Committee) IsCRMemberByDID(did common.Uint168) bool

func (*Committee) IsCustomIDResultNeeded added in v0.7.0

func (c *Committee) IsCustomIDResultNeeded() bool

func (*Committee) IsElectedCRMemberByDID added in v0.7.0

func (c *Committee) IsElectedCRMemberByDID(did common.Uint168) bool

func (*Committee) IsInElectionPeriod

func (c *Committee) IsInElectionPeriod() bool

func (*Committee) IsInVotingPeriod

func (c *Committee) IsInVotingPeriod(height uint32) bool

func (*Committee) IsProposalAllowed

func (c *Committee) IsProposalAllowed(height uint32) bool

func (*Committee) IsProposalFull

func (c *Committee) IsProposalFull(did common.Uint168) bool

func (*Committee) ProcessBlock

func (c *Committee) ProcessBlock(block *types.Block, confirm *payload.Confirm)

func (*Committee) Recover

func (c *Committee) Recover(checkpoint *Checkpoint)

func (*Committee) RegisterFuncitons

func (c *Committee) RegisterFuncitons(cfg *CommitteeFuncsConfig)

func (*Committee) RollbackTo

func (c *Committee) RollbackTo(height uint32) error

func (*Committee) Snapshot

func (c *Committee) Snapshot() *CommitteeKeyFrame

func (*Committee) TryRevertCRMemberIllegal added in v0.7.0

func (c *Committee) TryRevertCRMemberIllegal(did common.Uint168, oriState MemberState, height uint32)

func (*Committee) TryRevertCRMemberInactivity added in v0.7.0

func (c *Committee) TryRevertCRMemberInactivity(did common.Uint168,
	oriState MemberState, oriInactiveCount uint32, height uint32)

func (*Committee) TryUpdateCRMemberIllegal added in v0.7.0

func (c *Committee) TryUpdateCRMemberIllegal(did common.Uint168, height uint32)

func (*Committee) TryUpdateCRMemberInactivity added in v0.7.0

func (c *Committee) TryUpdateCRMemberInactivity(did common.Uint168,
	needReset bool, height uint32)

type CommitteeFuncsConfig

type CommitteeFuncsConfig struct {
	GetTxReference func(tx *types.Transaction) (
		map[*types.Input]types.Output, error)
	GetHeight                        func() uint32
	CreateCRAppropriationTransaction func() (*types.Transaction, common.Fixed64, error)
	CreateCRAssetsRectifyTransaction func() (*types.Transaction, error)
	CreateCRRealWithdrawTransaction  func(withdrawTransactionHashes []common.Uint256,
		outpus []*types.OutputInfo) (*types.Transaction, error)
	IsCurrent      func() bool
	Broadcast      func(msg p2p.Message)
	AppendToTxpool func(transaction *types.Transaction) elaerr.ELAError
	GetUTXO        func(programHash *common.Uint168) ([]*types.UTXO, error)
}

type CommitteeKeyFrame

type CommitteeKeyFrame struct {
	*KeyFrame
	*StateKeyFrame
	*ProposalKeyFrame
}

type DepositInfo

type DepositInfo struct {
	DepositAmount common.Fixed64
	Penalty       common.Fixed64
	TotalAmount   common.Fixed64
}

func (*DepositInfo) Deserialize

func (d *DepositInfo) Deserialize(r io.Reader) (err error)

func (*DepositInfo) Serialize

func (d *DepositInfo) Serialize(w io.Writer) (err error)

type FunctionsConfig

type FunctionsConfig struct {
	GetHistoryMember func(code []byte) []*CRMember
	GetTxReference   func(tx *types.Transaction) (
		map[*types.Input]types.Output, error)
}

type ICRRecord

type ICRRecord interface {
	GetHeightsDesc() ([]uint32, error)
	GetCheckpoint(height uint32) (*Checkpoint, error)
	SaveCheckpoint(point *Checkpoint) error
}

ICRRecord defines necessary operations about CR checkpoint

type KeyFrame

type KeyFrame struct {
	Members                  map[common.Uint168]*CRMember
	HistoryMembers           map[uint64]map[common.Uint168]*CRMember
	PartProposalResults      []payload.ProposalResult
	LastCommitteeHeight      uint32
	LastVotingStartHeight    uint32
	InElectionPeriod         bool
	NeedAppropriation        bool
	NeedRecordProposalResult bool
	CRCFoundationBalance     common.Fixed64
	CRCCommitteeBalance      common.Fixed64
	CRCCommitteeUsedAmount   common.Fixed64
	CRCCurrentStageAmount    common.Fixed64
	DestroyedAmount          common.Fixed64
	CirculationAmount        common.Fixed64
	AppropriationAmount      common.Fixed64
	CommitteeUsedAmount      common.Fixed64

	CRAssetsAddressUTXOCount uint32
}

StateKeyFrame holds necessary state about CR committee.

func NewKeyFrame

func NewKeyFrame() *KeyFrame

func (*KeyFrame) Deserialize

func (kf *KeyFrame) Deserialize(r io.Reader) (err error)

func (*KeyFrame) Serialize

func (kf *KeyFrame) Serialize(w io.Writer) (err error)

func (*KeyFrame) Snapshot

func (kf *KeyFrame) Snapshot() *KeyFrame

type MemberState

type MemberState byte

MemberState defines states during a CR member lifetime

const (
	// MemberElected indicates the CR member is Elected.
	MemberElected MemberState = iota

	// MemberImpeached indicates the CR member was impeached.
	MemberImpeached

	// MemberTerminated indicates the CR member was terminated because elected
	// CR members are not enough.
	MemberTerminated

	// MemberReturned indicates the CR member has deposit returned.
	MemberReturned

	// MemberInactive indicates the CR member was inactive because the dpos node
	// is inactive.
	MemberInactive

	// MemberIllegal indicates the CR member was illegal because the dpos node
	// is illegal.
	MemberIllegal
)

func (*MemberState) String

func (s *MemberState) String() string

type ProposalHashSet

type ProposalHashSet map[common.Uint256]struct{}

func NewProposalHashSet

func NewProposalHashSet() ProposalHashSet

func (*ProposalHashSet) Add

func (set *ProposalHashSet) Add(proposalHash common.Uint256) bool

func (*ProposalHashSet) Clear

func (set *ProposalHashSet) Clear()

func (*ProposalHashSet) Contains

func (set *ProposalHashSet) Contains(proposalHash common.Uint256) bool

func (*ProposalHashSet) Equal

func (set *ProposalHashSet) Equal(other ProposalHashSet) bool

func (*ProposalHashSet) Len

func (set *ProposalHashSet) Len() int

func (*ProposalHashSet) Remove

func (set *ProposalHashSet) Remove(proposalHash common.Uint256)

type ProposalKeyFrame

type ProposalKeyFrame struct {
	// key is did value is proposalhash set
	Proposals       ProposalsMap
	ProposalHashes  map[common.Uint168]ProposalHashSet
	ProposalSession map[uint64][]common.Uint256
	// proposalWithdraw info
	WithdrawableTxInfo map[common.Uint256]types.OutputInfo
	// publicKey of SecretaryGeneral
	SecretaryGeneralPublicKey string
	// reserved custom id list
	ReservedCustomIDLists []string
	// received custom id list
	PendingReceivedCustomIDMap map[string]struct{}
	ReceivedCustomIDLists      []string
	// registered side chain name
	RegisteredSideChainNames []string
	// magic numbers
	RegisteredMagicNumbers []uint32
	// genesis hashes
	RegisteredGenesisHashes []common.Uint256

	// store register info with the approved height
	RegisteredSideChainPayloadInfo map[uint32]map[common.Uint256]payload.SideChainInfo

	//reserve CustomID
	ReservedCustomID bool
}

ProposalKeyFrame holds all runtime state about CR proposals.

func NewProposalKeyFrame

func NewProposalKeyFrame() *ProposalKeyFrame

func (*ProposalKeyFrame) Deserialize

func (p *ProposalKeyFrame) Deserialize(r io.Reader) (err error)

func (*ProposalKeyFrame) Serialize

func (p *ProposalKeyFrame) Serialize(w io.Writer) (err error)

func (*ProposalKeyFrame) Snapshot

func (p *ProposalKeyFrame) Snapshot() *ProposalKeyFrame

Snapshot will create a new ProposalKeyFrame object and deep copy all related data.

type ProposalManager

type ProposalManager struct {
	ProposalKeyFrame
	// contains filtered or unexported fields
}

ProposalManager used to manage all proposals existing in block chain.

func NewProposalManager

func NewProposalManager(params *config.Params) *ProposalManager

func (*ProposalManager) InitSecretaryGeneralPublicKey added in v0.7.0

func (p *ProposalManager) InitSecretaryGeneralPublicKey(publicKey string)

only init use

type ProposalState

type ProposalState struct {
	Status             ProposalStatus
	Proposal           payload.CRCProposalInfo
	TxHash             common.Uint256
	TxPayloadVer       byte
	CRVotes            map[common.Uint168]payload.VoteResult
	VotersRejectAmount common.Fixed64
	RegisterHeight     uint32
	VoteStartHeight    uint32

	WithdrawnBudgets    map[uint8]common.Fixed64 // proposalWithdraw
	WithdrawableBudgets map[uint8]common.Fixed64 // proposalTracking
	BudgetsStatus       map[uint8]BudgetStatus
	FinalPaymentStatus  bool

	TrackingCount    uint8
	TerminatedHeight uint32
	ProposalOwner    []byte
	Recipient        common.Uint168
}

ProposalState defines necessary state about an CR proposals.

func (*ProposalState) Deserialize

func (p *ProposalState) Deserialize(r io.Reader) (err error)

func (*ProposalState) Serialize

func (p *ProposalState) Serialize(w io.Writer) (err error)

type ProposalStatus

type ProposalStatus uint8
const (
	// Registered is the status means the CRC proposal tx has been on the best
	//	chain.
	Registered ProposalStatus = 0x00

	// CRAgreed means CRC has agreed the proposal.
	CRAgreed ProposalStatus = 0x01

	// VoterAgreed means there are not enough negative vote about the proposal.
	VoterAgreed ProposalStatus = 0x02

	// Finished means the proposal has run out the lifetime.
	Finished ProposalStatus = 0x03

	// CRCanceled means the proposal canceled by CRC voting.
	CRCanceled ProposalStatus = 0x04

	// VoterCanceled means the proposal canceled by voters' reject voting.
	VoterCanceled ProposalStatus = 0x05

	// Terminated means proposal had been approved by both CR and voters,
	// whoever the proposal related project has been decided to terminate for
	// some reason.
	Terminated ProposalStatus = 0x06

	// Aborted means the proposal was cancelled because of a snap election.
	Aborted ProposalStatus = 0x07
)

func (ProposalStatus) String

func (status ProposalStatus) String() string

type ProposalsMap

type ProposalsMap map[common.Uint256]*ProposalState

func NewProposalMap

func NewProposalMap() ProposalsMap

type ReviewDraftDataMap added in v0.7.0

type ReviewDraftDataMap map[common.Uint256][]byte

type State

type State struct {
	StateKeyFrame
	// contains filtered or unexported fields
}

State hold all CR candidates related information, and process block by block to update votes and any other changes about candidates.

func NewState

func NewState(chainParams *config.Params) *State

func (*State) ExistCandidateByCID

func (s *State) ExistCandidateByCID(cid common.Uint168) (ok bool)

ExistCandidateByCID judges if there is a candidate with specified cid.

func (*State) IsCRTransaction

func (s *State) IsCRTransaction(tx *types.Transaction) bool

IsCRTransaction returns if a transaction will change the CR and votes state.

func (*State) RevertUpdateCRIllegalPenalty added in v0.7.0

func (s *State) RevertUpdateCRIllegalPenalty(cid common.Uint168)

func (*State) RevertUpdateCRInactivePenalty added in v0.7.0

func (s *State) RevertUpdateCRInactivePenalty(cid common.Uint168)

func (*State) SetManager

func (s *State) SetManager(manager *ProposalManager)

SetManager set current proposal manager that holds state of proposals.

func (*State) UpdateCRIllegalPenalty added in v0.7.0

func (s *State) UpdateCRIllegalPenalty(cid common.Uint168)

func (*State) UpdateCRInactivePenalty added in v0.7.0

func (s *State) UpdateCRInactivePenalty(cid common.Uint168)

type StateKeyFrame

type StateKeyFrame struct {
	CodeCIDMap        map[string]common.Uint168
	DepositHashCIDMap map[common.Uint168]common.Uint168
	Candidates        map[common.Uint168]*Candidate
	HistoryCandidates map[uint64]map[common.Uint168]*Candidate

	CurrentSession       uint64
	Nicknames            map[string]struct{}
	Votes                map[string]struct{}
	DepositOutputs       map[string]common.Fixed64
	CRCFoundationOutputs map[string]common.Fixed64
	CRCCommitteeOutputs  map[string]common.Fixed64
	// contains filtered or unexported fields
}

StateKeyFrame holds necessary state about CR state.

func NewStateKeyFrame

func NewStateKeyFrame() *StateKeyFrame

func (*StateKeyFrame) Deserialize

func (kf *StateKeyFrame) Deserialize(r io.Reader) (err error)

func (*StateKeyFrame) DeserializeFixed64Map

func (kf *StateKeyFrame) DeserializeFixed64Map(
	r io.Reader) (vmap map[string]common.Fixed64, err error)

func (*StateKeyFrame) Serialize

func (kf *StateKeyFrame) Serialize(w io.Writer) (err error)

func (*StateKeyFrame) SerializeFixed64Map

func (kf *StateKeyFrame) SerializeFixed64Map(w io.Writer,
	vmap map[string]common.Fixed64) (err error)

func (*StateKeyFrame) Snapshot

func (kf *StateKeyFrame) Snapshot() *StateKeyFrame

Snapshot will create a new StateKeyFrame object and deep copy all related data.

type TrackingDraftDataMap added in v0.7.0

type TrackingDraftDataMap map[common.Uint256][]byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL