Documentation ¶
Index ¶
- Constants
- Variables
- func GetLastHeight(dbase db.Database) (int64, error)
- func GetLastHeightOf(dbase db.Database) int64
- func NewManager(chain module.Chain, timestamper module.Timestamper, handler Handler) (module.BlockManager, error)
- func ResetDB(d db.Database, height int64) error
- func WriteTransactionLocators(dbase db.Database, height int64, ptl module.TransactionList, ...) error
- type Handler
- type RefCounter
- type RefTracer
Constants ¶
View Source
const (
ResultNotFinalizedError = errors.CodeBlock + iota
)
Variables ¶
View Source
var (
ErrResultNotFinalized = errors.NewBase(ResultNotFinalizedError, "ResultNotFinalized")
)
Functions ¶
func GetLastHeightOf ¶
func NewManager ¶
func NewManager( chain module.Chain, timestamper module.Timestamper, handler Handler, ) (module.BlockManager, error)
NewManager creates BlockManager.
func WriteTransactionLocators ¶ added in v0.9.7
func WriteTransactionLocators( dbase db.Database, height int64, ptl module.TransactionList, ntl module.TransactionList, ) error
Types ¶
type Handler ¶ added in v0.9.6
type Handler interface { // propose or genesis NewBlock( height int64, ts int64, proposer module.Address, prevID []byte, logsBloom module.LogsBloom, result []byte, patchTransactions module.TransactionList, normalTransactions module.TransactionList, nextValidators module.ValidatorList, votes module.CommitVoteSet, ) module.Block NewBlockFromHeaderReader(r io.Reader) (module.Block, error) NewBlockDataFromReader(r io.Reader) (module.BlockData, error) GetBlock(id []byte) (module.Block, error) GetBlockByHeight(height int64) (module.Block, error) FinalizeHeader(blk module.Block) error }
func NewBlockV2Handler ¶ added in v0.9.6
type RefCounter ¶
type RefCounter interface {
RefCount() int
}
type RefTracer ¶
func (*RefTracer) TraceDispose ¶
func (rt *RefTracer) TraceDispose(rc RefCounter)
func (*RefTracer) TraceNew ¶
func (rt *RefTracer) TraceNew(rc RefCounter)
func (*RefTracer) TraceRef ¶
func (rt *RefTracer) TraceRef(rc RefCounter)
func (*RefTracer) TraceUnref ¶
func (rt *RefTracer) TraceUnref(rc RefCounter)
Click to show internal directories.
Click to hide internal directories.