Documentation ¶
Overview ¶
* Copyright (C) 2018 The ZeepinChain Authors * This file is part of The ZeepinChain library. * * The ZeepinChain is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The ZeepinChain is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with The ZeepinChain. If not, see <http://www.gnu.org/licenses/>. * This file is part of The ZeepinChain library.
Index ¶
- func GenBestBlockHeaderKey() *pool.ByteBuffer
- func GenDataTransactionKey(hash common.Uint256) *pool.ByteBuffer
- func GenGenesisBlockKey() *pool.ByteBuffer
- type BestBlock
- type BestStateProvider
- type KeyPrefix
- type Store
- func (self *Store) Close() error
- func (self *Store) ContainTransaction(hash common.Uint256) bool
- func (self *Store) GetBestBlock() (BestBlock, error)
- func (self *Store) GetBestHeader() (*types.Header, error)
- func (self *Store) GetTransaction(hash common.Uint256) (*tx.Transaction, error)
- func (self *Store) GetTransactionBytes(hash common.Uint256) ([]byte, error)
- func (self *Store) PersistBlock(block *types.Block) error
- type TransactionProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenBestBlockHeaderKey ¶
func GenBestBlockHeaderKey() *pool.ByteBuffer
func GenDataTransactionKey ¶
func GenDataTransactionKey(hash common.Uint256) *pool.ByteBuffer
func GenGenesisBlockKey ¶
func GenGenesisBlockKey() *pool.ByteBuffer
Types ¶
type BestStateProvider ¶
type KeyPrefix ¶
type KeyPrefix byte
DataEntryPrefix
const ( //SYSTEM SYS_VERSION KeyPrefix = 0 SYS_GENESIS_BLOCK KeyPrefix = 1 // key: prefix, value: gensisBlock SYS_BEST_BLOCK KeyPrefix = 2 // key : prefix, value: bestblock SYS_BEST_BLOCK_HEADER KeyPrefix = 3 // key: prefix, value: BlockHeader // DATA //DATA_Block KeyPrefix = iota //DATA_Header DATA_TRANSACTION KeyPrefix = 10 // key: prefix+txid, value: height + tx )
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ContainTransaction ¶
implement TransactionProvider interface