Documentation ¶
Index ¶
- Variables
- func GetBlockHeaderFromBlockChain(blockID int64) (*types.BlockHeader, error)
- func GetDataFromFirstBlock() (data *types.FirstBlock, ok bool)
- func GetRollbacksHashWithDiffArr(dbTx *sqldb.DbTransaction, bId int64) ([]byte, error)
- func InsertBlockWOForksNew(data []byte, classifyTxsMap map[int][]*transaction.Transaction, ...) error
- func MarshallBlock(opts ...types.BlockDataOption) ([]byte, error)
- type AfterTxs
- type Block
- func (b *Block) AfterPlayTxs(dbTx *sqldb.DbTransaction) error
- func (b *Block) Check() error
- func (b *Block) CheckSign() error
- func (b *Block) GenAfterTxs() *AfterTxs
- func (b *Block) GetLogger() *log.Entry
- func (b *Block) GetRollbacksHash(dbTx *sqldb.DbTransaction) ([]byte, error)
- func (b *Block) InsertIntoBlockchain(dbTx *sqldb.DbTransaction) error
- func (b *Block) IsGenesis() bool
- func (b *Block) PlaySafe() error
- func (b *Block) ProcessTxs(dbTx *sqldb.DbTransaction) (err error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetBlockHeaderFromBlockChain ¶
func GetBlockHeaderFromBlockChain(blockID int64) (*types.BlockHeader, error)
GetBlockHeaderFromBlockChain is retrieving block data from blockchain
func GetDataFromFirstBlock ¶
func GetDataFromFirstBlock() (data *types.FirstBlock, ok bool)
GetDataFromFirstBlock returns data of first block
func GetRollbacksHashWithDiffArr ¶
func GetRollbacksHashWithDiffArr(dbTx *sqldb.DbTransaction, bId int64) ([]byte, error)
func InsertBlockWOForksNew ¶
func InsertBlockWOForksNew(data []byte, classifyTxsMap map[int][]*transaction.Transaction, genBlock, firstBlock bool) error
InsertBlockWOForks is inserting blocks
func MarshallBlock ¶
func MarshallBlock(opts ...types.BlockDataOption) ([]byte, error)
Types ¶
type AfterTxs ¶
type AfterTxs struct { UsedTx [][]byte Rts []*sqldb.RollbackTx Lts []*sqldb.LogTransaction UpdTxStatus []*pbgo.TxResult }
type Block ¶
type Block struct { *types.BlockData PrevRollbacksHash []byte Transactions []*transaction.Transaction GenBlock bool // it equals true when we are generating a new block Notifications []types.Notifications OutputsMap map[sqldb.KeyUTXO][]sqldb.SpentInfo ClassifyTxsMap map[int][]*transaction.Transaction PrevSysPar map[string]string EcoParams []sqldb.EcoParam // combustion percent,digits for each ecosystem }
Block is storing block data
func ProcessBlockByBinData ¶
ProcessBlockByBinData is processing block with in table previous block
func (*Block) AfterPlayTxs ¶
func (b *Block) AfterPlayTxs(dbTx *sqldb.DbTransaction) error
func (*Block) GenAfterTxs ¶
func (*Block) GetRollbacksHash ¶
func (b *Block) GetRollbacksHash(dbTx *sqldb.DbTransaction) ([]byte, error)
func (*Block) InsertIntoBlockchain ¶
func (b *Block) InsertIntoBlockchain(dbTx *sqldb.DbTransaction) error
InsertIntoBlockchain inserts a block into the blockchain
func (*Block) ProcessTxs ¶
func (b *Block) ProcessTxs(dbTx *sqldb.DbTransaction) (err error)
Click to show internal directories.
Click to hide internal directories.