Versions in this module Expand all Collapse all v1 v1.1.0 Mar 19, 2024 Changes in this version + func BuildMerkleTree(txs []common.Transaction) []byte + func LoadConfig(filepath string) + type BlockBuffer struct + func NewBlockBuffer(latest *common.Block, popChan chan *common.Block) (*BlockBuffer, error) + func (b *BlockBuffer) AppendBlock(block *common.Block) + func (b *BlockBuffer) GetPriorityLeaf(nowHeight int64) *common.Block + func (b *BlockBuffer) PopSelectedBlock() *common.Block + func (b *BlockBuffer) Process() + type BlockChain struct + func NewBlockchain(db *utils.LevelDB) *BlockChain + func (bc *BlockChain) AppendBlockTask(block *common.Block) + func (bc *BlockChain) BlockProcessRoutine() + func (bc *BlockChain) BufferFull() bool + func (bc *BlockChain) BufferedHeight() int64 + func (bc *BlockChain) GetBlockByHash(hash *common.Hash) (*common.Block, error) + func (bc *BlockChain) GetBlockByHeight(height int64) (*common.Block, error) + func (bc *BlockChain) GetLatestBlock() (*common.Block, error) + func (bc *BlockChain) GetTransactionByHash(hash common.Hash) (*common.Transaction, error) + func (bc *BlockChain) Height() int64 + func (bc *BlockChain) InsertBlock(block *common.Block) + func (bc *BlockChain) NewGenesisBlock() + func (bc *BlockChain) PackageNewBlock(txs []common.Transaction, timestamp int64, params *common.GeneralParams, ...) (*common.Block, error) + func (bc *BlockChain) ReadAddressData(address, key string) ([]byte, error) + type DataProcessor struct + func NewDataProcessor() *DataProcessor + func (dp *DataProcessor) Run() + type DataTask struct + Address []byte + Hash common.Hash + Height int64 + Key []byte + Type string + Value []byte + type TxPool struct + func GetTxPoolInst() *TxPool + func NewTxPool(chain *BlockChain) *TxPool + func (pool *TxPool) Add(transaction *common.Transaction) + func (pool *TxPool) CleanPool() + func (pool *TxPool) Contain(hash string) bool + func (pool *TxPool) Get(hash string) *common.Transaction + func (pool *TxPool) Package() []common.Transaction + func (pool *TxPool) RemoveTx(hash common.Hash)