Documentation ¶
Index ¶
- Variables
- type Miner
- type StateManager
- func (st *StateManager) BlockNotifications(ctx context.Context) <-chan *types.Block
- func (s *StateManager) GetStateRoot() *contract.State
- func (s *StateManager) Inform(p peer.ID, blk *types.Block)
- func (st *StateManager) InformTx(tx *types.Transaction)
- func (s *StateManager) ProcessNewBlock(ctx context.Context, blk *types.Block) error
- func (s *StateManager) SetBestBlock(b *types.Block)
Constants ¶
This section is empty.
Variables ¶
View Source
var MiningReward = big.NewInt(1000000)
Functions ¶
This section is empty.
Types ¶
type Miner ¶
type Miner struct { StateMgr *StateManager // contains filtered or unexported fields }
type StateManager ¶
type StateManager struct { BestBlock *types.Block HeadCid *cid.Cid StateRoot *contract.State TxPool *types.TransactionPool KnownGoodBlocks *cid.Set Miner *Miner // contains filtered or unexported fields }
StateManager manages the current state of the chain and handles validating and applying updates.
func NewStateManager ¶
func NewStateManager(cs *hamt.CborIpldStore, dag ipld.DAGService) *StateManager
func (*StateManager) BlockNotifications ¶
func (st *StateManager) BlockNotifications(ctx context.Context) <-chan *types.Block
func (*StateManager) GetStateRoot ¶
func (s *StateManager) GetStateRoot() *contract.State
func (*StateManager) Inform ¶
func (s *StateManager) Inform(p peer.ID, blk *types.Block)
Inform informs the state manager that we received a new block from the given peer
func (*StateManager) InformTx ¶
func (st *StateManager) InformTx(tx *types.Transaction)
func (*StateManager) ProcessNewBlock ¶
func (*StateManager) SetBestBlock ¶
func (s *StateManager) SetBestBlock(b *types.Block)
Click to show internal directories.
Click to hide internal directories.