Versions in this module Expand all Collapse all v1 v1.1.0 Oct 24, 2023 v1.0.0 Oct 17, 2023 Changes in this version + func CreateGenesisBlock(balanceAlloc map[string]*big.Int, db *dbstore.DB) *types.Block + func StartBlockchain(config *config.Config) + type Blockchain struct + BlockCh chan *types.Block + BlockChSize int + BlockchainDb *dbstore.BlockchainDB + Consensus consensus.Consensus + LastBlock *types.Block + LastHash *util.Hash + MineInterrupt chan bool + MineInterruptSize int + Mutex *sync.RWMutex + P2PServer *p2p.P2PServer + RPCServer *rpc.RPCServer + Signer *util.Address + StateDB *dbstore.StateDB + TxProcessor *executer.TxProcessor + Txpool *txpool.TxPool + TxpoolCh chan *types.Transaction + TxpoolChSize int + func NewBlockchain(c *config.Config) *Blockchain + func (bc *Blockchain) AddBlock(data []byte, txs []*types.Transaction, mineInterrupt chan bool, ...) error + func (bc *Blockchain) AddExternalBlock(block *types.Block) error + func (bc *Blockchain) Current() *types.Block + func (bc *Blockchain) GetBlockByHash(h *util.Hash) (*types.Block, error) + func (bc *Blockchain) GetBlockByNumber(b *big.Int) (*types.Block, error) + func (bc *Blockchain) ImportBlockLoop() + func (bc *Blockchain) RemoveLastBlock()