Documentation
¶
Index ¶
- Constants
- func BlockHash2DBKey(hash common.Hash) []byte
- func BlockHeight2DBKey(height int64) []byte
- func ByteAddressToHexString(address []byte) string
- func DataAddressKey2DBKey(address, key []byte) []byte
- func DeserializeBlock(byteBlockData []byte) (*common.Block, error)
- func DeserializeBroadcastMessage(byteTxData []byte) (*p2p.BroadcastMessage, error)
- func DeserializeDataCommand(byteDataCommand []byte) (*common.DataCommand, error)
- func DeserializeGeneralParams(byteParamsData []byte) (*common.GeneralParams, error)
- func DeserializeGenesisParams(byteParamsData []byte) (*common.GenesisParams, error)
- func DeserializeStatusMsg(byteMsgData []byte) (*p2p.SyncStatusMsg, error)
- func DeserializeTimeSyncMsg(byteTimeSyncMsg []byte) (*p2p.TimeSyncMsg, error)
- func DeserializeTransaction(byteTxData []byte) (*common.Transaction, error)
- func KarmemBlock2Protobuf(block *common.Block, full bool) *pb.Block
- func KarmemTransaction2Protobuf(tx *common.Transaction) *pb.Transaction
- func SerializeBlock(block *common.Block) ([]byte, error)
- func SerializeBlockHeader(header *common.BlockHeader) ([]byte, error)
- func SerializeBroadcastMessage(msg *p2p.BroadcastMessage) ([]byte, error)
- func SerializeDataCommand(dc *common.DataCommand) ([]byte, error)
- func SerializeGeneralParams(p *common.GeneralParams) ([]byte, error)
- func SerializeGenesisParams(p *common.GenesisParams) ([]byte, error)
- func SerializeStatusMsg(msg *p2p.SyncStatusMsg) ([]byte, error)
- func SerializeTimeSyncMsg(msg *p2p.TimeSyncMsg) ([]byte, error)
- func SerializeTransaction(transaction *common.Transaction) ([]byte, error)
- func TxHash2DBKey(hash common.Hash) []byte
- type LevelDB
Constants ¶
View Source
const (
KARMEM_CAP = 1024
)
Variables ¶
This section is empty.
Functions ¶
func BlockHash2DBKey ¶
func BlockHeight2DBKey ¶
func ByteAddressToHexString ¶
func DataAddressKey2DBKey ¶
func DeserializeBroadcastMessage ¶
func DeserializeBroadcastMessage(byteTxData []byte) (*p2p.BroadcastMessage, error)
func DeserializeDataCommand ¶
func DeserializeDataCommand(byteDataCommand []byte) (*common.DataCommand, error)
func DeserializeGeneralParams ¶
func DeserializeGeneralParams(byteParamsData []byte) (*common.GeneralParams, error)
func DeserializeGenesisParams ¶
func DeserializeGenesisParams(byteParamsData []byte) (*common.GenesisParams, error)
func DeserializeStatusMsg ¶
func DeserializeStatusMsg(byteMsgData []byte) (*p2p.SyncStatusMsg, error)
func DeserializeTimeSyncMsg ¶
func DeserializeTimeSyncMsg(byteTimeSyncMsg []byte) (*p2p.TimeSyncMsg, error)
func DeserializeTransaction ¶
func DeserializeTransaction(byteTxData []byte) (*common.Transaction, error)
func KarmemTransaction2Protobuf ¶
func KarmemTransaction2Protobuf(tx *common.Transaction) *pb.Transaction
func SerializeBlockHeader ¶
func SerializeBlockHeader(header *common.BlockHeader) ([]byte, error)
func SerializeBroadcastMessage ¶
func SerializeBroadcastMessage(msg *p2p.BroadcastMessage) ([]byte, error)
func SerializeDataCommand ¶
func SerializeDataCommand(dc *common.DataCommand) ([]byte, error)
func SerializeGeneralParams ¶
func SerializeGeneralParams(p *common.GeneralParams) ([]byte, error)
func SerializeGenesisParams ¶
func SerializeGenesisParams(p *common.GenesisParams) ([]byte, error)
func SerializeStatusMsg ¶
func SerializeStatusMsg(msg *p2p.SyncStatusMsg) ([]byte, error)
func SerializeTimeSyncMsg ¶
func SerializeTimeSyncMsg(msg *p2p.TimeSyncMsg) ([]byte, error)
func SerializeTransaction ¶
func SerializeTransaction(transaction *common.Transaction) ([]byte, error)
func TxHash2DBKey ¶
Types ¶
type LevelDB ¶
type LevelDB struct {
// contains filtered or unexported fields
}
func NewLevelDB ¶
func (*LevelDB) BatchDelete ¶
Click to show internal directories.
Click to hide internal directories.