Documentation
¶
Index ¶
- Constants
- Variables
- func GetBlockHeaderHashByHeight(dbase db.Database, c codec.Codec, height int64) ([]byte, error)
- func GetBlockVersion(dbase db.Database, c codec.Codec, height int64) (int, error)
- func GetCommitVoteListBytesByHeight(dbase db.Database, c codec.Codec, height int64) ([]byte, error)
- func GetLastHeight(dbase db.Database) (int64, error)
- func GetLastHeightOf(dbase db.Database) int64
- func GetLastHeightWithCodec(dbase db.Database, c codec.Codec) (int64, error)
- func NewBlockV2Handler(chain base.Chain) base.BlockHandler
- func NewManager(chain module.Chain, timestamper module.Timestamper, ...) (module.BlockManager, error)
- func PeekVersion(r io.Reader) (int, io.Reader, error)
- func ReadVersion(r io.Reader) (int, error)
- func ResetDB(d db.Database, c codec.Codec, height int64) error
- func WriteTransactionLocators(dbase db.Database, height int64, ptl module.TransactionList, ...) error
- type Chain
- type RefCounter
- type RefTracer
- type ServiceManager
Constants ¶
View Source
const (
ResultNotFinalizedError = errors.CodeBlock + iota
)
Variables ¶
View Source
var (
ErrResultNotFinalized = errors.NewBase(ResultNotFinalizedError, "ResultNotFinalized")
)
Functions ¶
func GetBlockHeaderHashByHeight ¶ added in v1.1.1
func GetBlockVersion ¶ added in v1.1.1
func GetCommitVoteListBytesByHeight ¶ added in v1.1.1
func GetLastHeightOf ¶
func GetLastHeightWithCodec ¶ added in v1.1.1
func NewBlockV2Handler ¶ added in v0.9.6
func NewBlockV2Handler(chain base.Chain) base.BlockHandler
func NewManager ¶
func NewManager( chain module.Chain, timestamper module.Timestamper, handlers []base.BlockHandler, ) (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 Chain ¶ added in v0.9.10
type Chain interface {
Database() db.Database
Wallet() module.Wallet
ServiceManager() module.ServiceManager
NID() int
CID() int
GenesisStorage() module.GenesisStorage
CommitVoteSetDecoder() module.CommitVoteSetDecoder
Genesis() []byte
}
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)
type ServiceManager ¶ added in v0.9.10
type ServiceManager interface {
module.TransitionManager
TransactionFromBytes(b []byte, blockVersion int) (module.Transaction, error)
GetChainID(result []byte) (int64, error)
GetNetworkID(result []byte) (int64, error)
GetNextBlockVersion(result []byte) int
ImportResult(result []byte, vh []byte, src db.Database) error
GenesisTransactionFromBytes(b []byte, blockVersion int) (module.Transaction, error)
TransactionListFromHash(hash []byte) module.TransactionList
ReceiptListFromResult(result []byte, g module.TransactionGroup) (module.ReceiptList, error)
SendTransaction(result []byte, height int64, tx interface{}) ([]byte, error)
ValidatorListFromHash(hash []byte) module.ValidatorList
TransactionListFromSlice(txs []module.Transaction, version int) module.TransactionList
SendTransactionAndWait(result []byte, height int64, tx interface{}) ([]byte, <-chan interface{}, error)
WaitTransactionResult(id []byte) (<-chan interface{}, error)
ExportResult(result []byte, vh []byte, dst db.Database) error
}
Click to show internal directories.
Click to hide internal directories.