Documentation ¶
Index ¶
- type BlockChain
- func (bc *BlockChain) ChainID() uint16
- func (bc *BlockChain) CurrentBlock() *types.Block
- func (bc *BlockChain) DeputyManager() *deputynode.Manager
- func (bc *BlockChain) Genesis() *types.Block
- func (bc *BlockChain) GetBlockByHash(hash common.Hash) *types.Block
- func (bc *BlockChain) GetBlockByHeight(height uint32) *types.Block
- func (bc *BlockChain) HasBlock(hash common.Hash) bool
- func (bc *BlockChain) InsertBlock(block *types.Block) error
- func (bc *BlockChain) InsertConfirms(height uint32, blockHash common.Hash, sigList []types.SignData)
- func (bc *BlockChain) InsertStableConfirms(pack coreNet.BlockConfirms)
- func (bc *BlockChain) IsInBlackList(b *types.Block) bool
- func (bc *BlockChain) StableBlock() *types.Block
- type ReBuildAccount
- func (account *ReBuildAccount) BuildAccountData() *types.AccountData
- func (account *ReBuildAccount) GetAddress() common.Address
- func (account *ReBuildAccount) GetAssetCode(code common.Hash) (*types.Asset, error)
- func (account *ReBuildAccount) GetAssetCodeFromDB(code common.Hash) (*types.Asset, error)
- func (account *ReBuildAccount) GetAssetCodeRoot() common.Hash
- func (account *ReBuildAccount) GetAssetCodeState(code common.Hash, key string) (string, error)
- func (account *ReBuildAccount) GetAssetCodeTotalSupply(code common.Hash) (*big.Int, error)
- func (account *ReBuildAccount) GetAssetIdRoot() common.Hash
- func (account *ReBuildAccount) GetAssetIdState(id common.Hash) (string, error)
- func (account *ReBuildAccount) GetBalance() *big.Int
- func (account *ReBuildAccount) GetCandidate() types.Profile
- func (account *ReBuildAccount) GetCandidateState(key string) string
- func (account *ReBuildAccount) GetCode() (types.Code, error)
- func (account *ReBuildAccount) GetCodeHash() common.Hash
- func (account *ReBuildAccount) GetEquity(id common.Hash) (*types.AssetEquity, error)
- func (account *ReBuildAccount) GetEquityRoot() common.Hash
- func (account *ReBuildAccount) GetEquityState(id common.Hash) (*types.AssetEquity, error)
- func (account *ReBuildAccount) GetEvents() []*types.Event
- func (account *ReBuildAccount) GetNextVersion(logType types.ChangeLogType) uint32
- func (account *ReBuildAccount) GetSigners() types.Signers
- func (account *ReBuildAccount) GetStorageRoot() common.Hash
- func (account *ReBuildAccount) GetStorageState(key common.Hash) ([]byte, error)
- func (account *ReBuildAccount) GetSuicide() bool
- func (account *ReBuildAccount) GetVersion(logType types.ChangeLogType) uint32
- func (account *ReBuildAccount) GetVoteFor() common.Address
- func (account *ReBuildAccount) GetVotes() *big.Int
- func (account *ReBuildAccount) IsEmpty() bool
- func (account *ReBuildAccount) MarshalJSON() ([]byte, error)
- func (account *ReBuildAccount) PopEvent() error
- func (account *ReBuildAccount) PushEvent(event *types.Event)
- func (account *ReBuildAccount) SetAssetCode(code common.Hash, asset *types.Asset) error
- func (account *ReBuildAccount) SetAssetCodeRoot(root common.Hash)
- func (account *ReBuildAccount) SetAssetCodeState(code common.Hash, key string, val string) error
- func (account *ReBuildAccount) SetAssetCodeTotalSupply(code common.Hash, val *big.Int) error
- func (account *ReBuildAccount) SetAssetIdRoot(root common.Hash)
- func (account *ReBuildAccount) SetAssetIdState(id common.Hash, data string) error
- func (account *ReBuildAccount) SetBalance(balance *big.Int)
- func (account *ReBuildAccount) SetCandidate(profile types.Profile)
- func (account *ReBuildAccount) SetCandidateState(key string, val string)
- func (account *ReBuildAccount) SetCode(code types.Code)
- func (account *ReBuildAccount) SetCodeHash(codeHash common.Hash)
- func (account *ReBuildAccount) SetEquityRoot(root common.Hash)
- func (account *ReBuildAccount) SetEquityState(id common.Hash, equity *types.AssetEquity) error
- func (account *ReBuildAccount) SetSingers(signers types.Signers) error
- func (account *ReBuildAccount) SetStorageRoot(root common.Hash)
- func (account *ReBuildAccount) SetStorageState(key common.Hash, value []byte) error
- func (account *ReBuildAccount) SetSuicide(suicided bool)
- func (account *ReBuildAccount) SetVoteFor(addr common.Address)
- func (account *ReBuildAccount) SetVotes(votes *big.Int)
- type ReBuildEngine
- type TxPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockChain ¶
type BlockChain struct {
// contains filtered or unexported fields
}
func NewBlockChain ¶
func (*BlockChain) CurrentBlock ¶
func (bc *BlockChain) CurrentBlock() *types.Block
CurrentBlock get latest current block
func (*BlockChain) DeputyManager ¶
func (bc *BlockChain) DeputyManager() *deputynode.Manager
func (*BlockChain) GetBlockByHash ¶
func (bc *BlockChain) GetBlockByHash(hash common.Hash) *types.Block
func (*BlockChain) GetBlockByHeight ¶
func (bc *BlockChain) GetBlockByHeight(height uint32) *types.Block
func (*BlockChain) HasBlock ¶
func (bc *BlockChain) HasBlock(hash common.Hash) bool
HasBlock has special block in local
func (*BlockChain) InsertBlock ¶ added in v1.2.0
func (bc *BlockChain) InsertBlock(block *types.Block) error
func (*BlockChain) InsertConfirms ¶ added in v1.2.0
func (bc *BlockChain) InsertConfirms(height uint32, blockHash common.Hash, sigList []types.SignData)
not used. just for implement interface
func (*BlockChain) InsertStableConfirms ¶ added in v1.2.0
func (bc *BlockChain) InsertStableConfirms(pack coreNet.BlockConfirms)
func (*BlockChain) IsInBlackList ¶ added in v1.2.0
func (bc *BlockChain) IsInBlackList(b *types.Block) bool
func (*BlockChain) StableBlock ¶
func (bc *BlockChain) StableBlock() *types.Block
StableBlock get latest stable block
type ReBuildAccount ¶
type ReBuildAccount struct { types.AccountData Store database.DBEngine Code []byte AssetCodes map[common.Hash]*types.Asset MetaDatas map[common.Hash]string AssetEquities map[common.Hash]*types.AssetEquity Storage map[common.Hash][]byte Events []*types.Event IsCancelCandidate bool NextVersion map[types.ChangeLogType]uint32 // contains filtered or unexported fields }
func NewReBuildAccount ¶
func NewReBuildAccount(store database.DBEngine, data *types.AccountData) *ReBuildAccount
func (*ReBuildAccount) BuildAccountData ¶
func (account *ReBuildAccount) BuildAccountData() *types.AccountData
func (*ReBuildAccount) GetAddress ¶
func (account *ReBuildAccount) GetAddress() common.Address
func (*ReBuildAccount) GetAssetCode ¶
func (*ReBuildAccount) GetAssetCodeFromDB ¶
func (*ReBuildAccount) GetAssetCodeRoot ¶
func (account *ReBuildAccount) GetAssetCodeRoot() common.Hash
func (*ReBuildAccount) GetAssetCodeState ¶
func (*ReBuildAccount) GetAssetCodeTotalSupply ¶
func (*ReBuildAccount) GetAssetIdRoot ¶
func (account *ReBuildAccount) GetAssetIdRoot() common.Hash
func (*ReBuildAccount) GetAssetIdState ¶
func (account *ReBuildAccount) GetAssetIdState(id common.Hash) (string, error)
func (*ReBuildAccount) GetBalance ¶
func (account *ReBuildAccount) GetBalance() *big.Int
func (*ReBuildAccount) GetCandidate ¶
func (account *ReBuildAccount) GetCandidate() types.Profile
func (*ReBuildAccount) GetCandidateState ¶
func (account *ReBuildAccount) GetCandidateState(key string) string
func (*ReBuildAccount) GetCodeHash ¶
func (account *ReBuildAccount) GetCodeHash() common.Hash
func (*ReBuildAccount) GetEquity ¶
func (account *ReBuildAccount) GetEquity(id common.Hash) (*types.AssetEquity, error)
func (*ReBuildAccount) GetEquityRoot ¶
func (account *ReBuildAccount) GetEquityRoot() common.Hash
func (*ReBuildAccount) GetEquityState ¶
func (account *ReBuildAccount) GetEquityState(id common.Hash) (*types.AssetEquity, error)
func (*ReBuildAccount) GetEvents ¶
func (account *ReBuildAccount) GetEvents() []*types.Event
func (*ReBuildAccount) GetNextVersion ¶
func (account *ReBuildAccount) GetNextVersion(logType types.ChangeLogType) uint32
func (*ReBuildAccount) GetSigners ¶ added in v1.2.0
func (account *ReBuildAccount) GetSigners() types.Signers
func (*ReBuildAccount) GetStorageRoot ¶
func (account *ReBuildAccount) GetStorageRoot() common.Hash
func (*ReBuildAccount) GetStorageState ¶
func (account *ReBuildAccount) GetStorageState(key common.Hash) ([]byte, error)
func (*ReBuildAccount) GetSuicide ¶
func (account *ReBuildAccount) GetSuicide() bool
func (*ReBuildAccount) GetVersion ¶
func (account *ReBuildAccount) GetVersion(logType types.ChangeLogType) uint32
func (*ReBuildAccount) GetVoteFor ¶
func (account *ReBuildAccount) GetVoteFor() common.Address
func (*ReBuildAccount) GetVotes ¶
func (account *ReBuildAccount) GetVotes() *big.Int
func (*ReBuildAccount) IsEmpty ¶
func (account *ReBuildAccount) IsEmpty() bool
func (*ReBuildAccount) MarshalJSON ¶
func (account *ReBuildAccount) MarshalJSON() ([]byte, error)
func (*ReBuildAccount) PopEvent ¶
func (account *ReBuildAccount) PopEvent() error
func (*ReBuildAccount) PushEvent ¶
func (account *ReBuildAccount) PushEvent(event *types.Event)
func (*ReBuildAccount) SetAssetCode ¶
func (*ReBuildAccount) SetAssetCodeRoot ¶
func (account *ReBuildAccount) SetAssetCodeRoot(root common.Hash)
func (*ReBuildAccount) SetAssetCodeState ¶
func (*ReBuildAccount) SetAssetCodeTotalSupply ¶
func (*ReBuildAccount) SetAssetIdRoot ¶
func (account *ReBuildAccount) SetAssetIdRoot(root common.Hash)
func (*ReBuildAccount) SetAssetIdState ¶
func (account *ReBuildAccount) SetAssetIdState(id common.Hash, data string) error
func (*ReBuildAccount) SetBalance ¶
func (account *ReBuildAccount) SetBalance(balance *big.Int)
func (*ReBuildAccount) SetCandidate ¶
func (account *ReBuildAccount) SetCandidate(profile types.Profile)
func (*ReBuildAccount) SetCandidateState ¶
func (account *ReBuildAccount) SetCandidateState(key string, val string)
func (*ReBuildAccount) SetCode ¶
func (account *ReBuildAccount) SetCode(code types.Code)
func (*ReBuildAccount) SetCodeHash ¶
func (account *ReBuildAccount) SetCodeHash(codeHash common.Hash)
func (*ReBuildAccount) SetEquityRoot ¶
func (account *ReBuildAccount) SetEquityRoot(root common.Hash)
func (*ReBuildAccount) SetEquityState ¶
func (account *ReBuildAccount) SetEquityState(id common.Hash, equity *types.AssetEquity) error
func (*ReBuildAccount) SetSingers ¶ added in v1.2.0
func (account *ReBuildAccount) SetSingers(signers types.Signers) error
func (*ReBuildAccount) SetStorageRoot ¶
func (account *ReBuildAccount) SetStorageRoot(root common.Hash)
func (*ReBuildAccount) SetStorageState ¶
func (account *ReBuildAccount) SetStorageState(key common.Hash, value []byte) error
func (*ReBuildAccount) SetSuicide ¶
func (account *ReBuildAccount) SetSuicide(suicided bool)
func (*ReBuildAccount) SetVoteFor ¶
func (account *ReBuildAccount) SetVoteFor(addr common.Address)
func (*ReBuildAccount) SetVotes ¶
func (account *ReBuildAccount) SetVotes(votes *big.Int)
type ReBuildEngine ¶
type ReBuildEngine struct { Store database.DBEngine Block *types.Block ReBuildAccountsCache map[common.Address]*ReBuildAccount }
func NewReBuildEngine ¶
func NewReBuildEngine(store database.DBEngine, block *types.Block) *ReBuildEngine
func (*ReBuildEngine) Close ¶
func (engine *ReBuildEngine) Close()
func (*ReBuildEngine) GetAccount ¶
func (engine *ReBuildEngine) GetAccount(address common.Address) types.AccountAccessor
func (*ReBuildEngine) ReBuild ¶
func (engine *ReBuildEngine) ReBuild() error
func (*ReBuildEngine) Save ¶
func (engine *ReBuildEngine) Save() error
Click to show internal directories.
Click to hide internal directories.