Documentation ¶
Index ¶
- func CheckBlockPairIntegrity(block interfaces.IDirectoryBlock, prev interfaces.IDirectoryBlock) error
- func NewDirectoryBlock(prev interfaces.IDirectoryBlock) interfaces.IDirectoryBlock
- func UnmarshalDBlock(data []byte) (interfaces.IDirectoryBlock, error)
- type DBEntry
- func (c *DBEntry) GetChainID() (rval interfaces.IHash)
- func (c *DBEntry) GetKeyMR() (rval interfaces.IHash)
- func (c *DBEntry) Init()
- func (a *DBEntry) IsSameAs(b interfaces.IDBEntry) bool
- func (e *DBEntry) JSONByte() ([]byte, error)
- func (e *DBEntry) JSONString() (string, error)
- func (e *DBEntry) MarshalBinary() (rval []byte, err error)
- func (c *DBEntry) SetChainID(chainID interfaces.IHash)
- func (c *DBEntry) SetKeyMR(keyMR interfaces.IHash)
- func (e *DBEntry) ShaHash() (rval interfaces.IHash)
- func (e *DBEntry) String() string
- func (e *DBEntry) UnmarshalBinary(data []byte) (err error)
- func (e *DBEntry) UnmarshalBinaryData(data []byte) ([]byte, error)
- type DBlockHeader
- func (h *DBlockHeader) GetBlockCount() uint32
- func (h *DBlockHeader) GetBodyMR() (rval interfaces.IHash)
- func (h *DBlockHeader) GetDBHeight() uint32
- func (b *DBlockHeader) GetHeaderHash() (interfaces.IHash, error)
- func (h *DBlockHeader) GetNetworkID() uint32
- func (h *DBlockHeader) GetPrevFullHash() (rval interfaces.IHash)
- func (h *DBlockHeader) GetPrevKeyMR() (rval interfaces.IHash)
- func (h *DBlockHeader) GetTimestamp() interfaces.Timestamp
- func (h *DBlockHeader) GetVersion() byte
- func (h *DBlockHeader) Init()
- func (a *DBlockHeader) IsSameAs(b interfaces.IDirectoryBlockHeader) bool
- func (e *DBlockHeader) JSONByte() ([]byte, error)
- func (e *DBlockHeader) JSONString() (string, error)
- func (b *DBlockHeader) MarshalBinary() (rval []byte, err error)
- func (e DBlockHeader) MarshalJSON() ([]byte, error)
- func (h *DBlockHeader) SetBlockCount(blockcount uint32)
- func (h *DBlockHeader) SetBodyMR(bodyMR interfaces.IHash)
- func (h *DBlockHeader) SetDBHeight(dbheight uint32)
- func (h *DBlockHeader) SetNetworkID(networkID uint32)
- func (h *DBlockHeader) SetPrevFullHash(PrevFullHash interfaces.IHash)
- func (h *DBlockHeader) SetPrevKeyMR(prevKeyMR interfaces.IHash)
- func (h *DBlockHeader) SetTimestamp(timestamp interfaces.Timestamp)
- func (h *DBlockHeader) SetVersion(version byte)
- func (e *DBlockHeader) String() string
- func (b *DBlockHeader) UnmarshalBinary(data []byte) (err error)
- func (b *DBlockHeader) UnmarshalBinaryData(data []byte) ([]byte, error)
- type DirectoryBlock
- func (b *DirectoryBlock) AddEntry(chainID interfaces.IHash, keyMR interfaces.IHash) error
- func (b *DirectoryBlock) BodyKeyMR() (rval interfaces.IHash)
- func (b *DirectoryBlock) BuildBodyMR() (interfaces.IHash, error)
- func (b *DirectoryBlock) BuildKeyMerkleRoot() (keyMR interfaces.IHash, err error)
- func (c *DirectoryBlock) CheckDBEntries() error
- func (c *DirectoryBlock) DatabasePrimaryIndex() (rval interfaces.IHash)
- func (c *DirectoryBlock) DatabaseSecondaryIndex() (rval interfaces.IHash)
- func (c *DirectoryBlock) GetChainID() (rval interfaces.IHash)
- func (c *DirectoryBlock) GetDBEntries() []interfaces.IDBEntry
- func (c *DirectoryBlock) GetDatabaseHeight() uint32
- func (c *DirectoryBlock) GetEBlockDBEntries() []interfaces.IDBEntry
- func (c *DirectoryBlock) GetEntryHashes() []interfaces.IHash
- func (c *DirectoryBlock) GetEntryHashesForBranch() []interfaces.IHash
- func (c *DirectoryBlock) GetEntrySigHashes() []interfaces.IHash
- func (b *DirectoryBlock) GetFullHash() (rval interfaces.IHash)
- func (b *DirectoryBlock) GetHash() (rval interfaces.IHash)
- func (c *DirectoryBlock) GetHeader() interfaces.IDirectoryBlockHeader
- func (b *DirectoryBlock) GetHeaderHash() (interfaces.IHash, error)
- func (c *DirectoryBlock) GetKeyMR() (rval interfaces.IHash)
- func (h *DirectoryBlock) GetTimestamp() interfaces.Timestamp
- func (c *DirectoryBlock) Init()
- func (a *DirectoryBlock) IsSameAs(b interfaces.IDirectoryBlock) bool
- func (e *DirectoryBlock) JSONByte() ([]byte, error)
- func (e *DirectoryBlock) JSONString() (string, error)
- func (b *DirectoryBlock) MarshalBinary() (rval []byte, err error)
- func (e DirectoryBlock) MarshalJSON() ([]byte, error)
- func (c *DirectoryBlock) New() interfaces.BinaryMarshallableAndCopyable
- func (c *DirectoryBlock) SetABlockHash(aBlock interfaces.IAdminBlock) error
- func (c *DirectoryBlock) SetDBEntries(dbEntries []interfaces.IDBEntry) error
- func (c *DirectoryBlock) SetECBlockHash(ecBlock interfaces.IEntryCreditBlock) error
- func (c *DirectoryBlock) SetEntryHash(hash, chainID interfaces.IHash, index int)
- func (c *DirectoryBlock) SetFBlockHash(fBlock interfaces.IFBlock) error
- func (c *DirectoryBlock) SetHeader(header interfaces.IDirectoryBlockHeader)
- func (c *DirectoryBlock) Sort()
- func (e *DirectoryBlock) String() string
- func (b *DirectoryBlock) UnmarshalBinary(data []byte) (err error)
- func (b *DirectoryBlock) UnmarshalBinaryData(data []byte) ([]byte, error)
- type ExpandedDBlock
- type ExpandedDBlockHeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBlockPairIntegrity ¶
func CheckBlockPairIntegrity(block interfaces.IDirectoryBlock, prev interfaces.IDirectoryBlock) error
func NewDirectoryBlock ¶
func NewDirectoryBlock(prev interfaces.IDirectoryBlock) interfaces.IDirectoryBlock
func UnmarshalDBlock ¶
func UnmarshalDBlock(data []byte) (interfaces.IDirectoryBlock, error)
Types ¶
type DBEntry ¶
type DBEntry struct { ChainID interfaces.IHash `json:"chainid"` KeyMR interfaces.IHash `json:"keymr"` // Different MR in EBlockHeader }
func (*DBEntry) GetChainID ¶
func (c *DBEntry) GetChainID() (rval interfaces.IHash)
func (*DBEntry) GetKeyMR ¶
func (c *DBEntry) GetKeyMR() (rval interfaces.IHash)
func (*DBEntry) JSONString ¶
func (*DBEntry) MarshalBinary ¶
func (*DBEntry) SetChainID ¶
func (c *DBEntry) SetChainID(chainID interfaces.IHash)
func (*DBEntry) SetKeyMR ¶
func (c *DBEntry) SetKeyMR(keyMR interfaces.IHash)
func (*DBEntry) ShaHash ¶
func (e *DBEntry) ShaHash() (rval interfaces.IHash)
func (*DBEntry) UnmarshalBinary ¶
type DBlockHeader ¶
type DBlockHeader struct { Version byte `json:"version"` NetworkID uint32 `json:"networkid"` BodyMR interfaces.IHash `json:"bodymr"` PrevKeyMR interfaces.IHash `json:"prevkeymr"` PrevFullHash interfaces.IHash `json:"prevfullhash"` Timestamp uint32 `json:"timestamp"` //in minutes DBHeight uint32 `json:"dbheight"` BlockCount uint32 `json:"blockcount"` }
func NewDBlockHeader ¶
func NewDBlockHeader() *DBlockHeader
func (*DBlockHeader) GetBlockCount ¶
func (h *DBlockHeader) GetBlockCount() uint32
func (*DBlockHeader) GetBodyMR ¶
func (h *DBlockHeader) GetBodyMR() (rval interfaces.IHash)
func (*DBlockHeader) GetDBHeight ¶
func (h *DBlockHeader) GetDBHeight() uint32
func (*DBlockHeader) GetHeaderHash ¶
func (b *DBlockHeader) GetHeaderHash() (interfaces.IHash, error)
func (*DBlockHeader) GetNetworkID ¶
func (h *DBlockHeader) GetNetworkID() uint32
func (*DBlockHeader) GetPrevFullHash ¶
func (h *DBlockHeader) GetPrevFullHash() (rval interfaces.IHash)
func (*DBlockHeader) GetPrevKeyMR ¶
func (h *DBlockHeader) GetPrevKeyMR() (rval interfaces.IHash)
func (*DBlockHeader) GetTimestamp ¶
func (h *DBlockHeader) GetTimestamp() interfaces.Timestamp
func (*DBlockHeader) GetVersion ¶
func (h *DBlockHeader) GetVersion() byte
func (*DBlockHeader) Init ¶
func (h *DBlockHeader) Init()
func (*DBlockHeader) IsSameAs ¶
func (a *DBlockHeader) IsSameAs(b interfaces.IDirectoryBlockHeader) bool
func (*DBlockHeader) JSONByte ¶
func (e *DBlockHeader) JSONByte() ([]byte, error)
func (*DBlockHeader) JSONString ¶
func (e *DBlockHeader) JSONString() (string, error)
func (*DBlockHeader) MarshalBinary ¶
func (b *DBlockHeader) MarshalBinary() (rval []byte, err error)
func (DBlockHeader) MarshalJSON ¶
func (e DBlockHeader) MarshalJSON() ([]byte, error)
func (*DBlockHeader) SetBlockCount ¶
func (h *DBlockHeader) SetBlockCount(blockcount uint32)
func (*DBlockHeader) SetBodyMR ¶
func (h *DBlockHeader) SetBodyMR(bodyMR interfaces.IHash)
func (*DBlockHeader) SetDBHeight ¶
func (h *DBlockHeader) SetDBHeight(dbheight uint32)
func (*DBlockHeader) SetNetworkID ¶
func (h *DBlockHeader) SetNetworkID(networkID uint32)
func (*DBlockHeader) SetPrevFullHash ¶
func (h *DBlockHeader) SetPrevFullHash(PrevFullHash interfaces.IHash)
func (*DBlockHeader) SetPrevKeyMR ¶
func (h *DBlockHeader) SetPrevKeyMR(prevKeyMR interfaces.IHash)
func (*DBlockHeader) SetTimestamp ¶
func (h *DBlockHeader) SetTimestamp(timestamp interfaces.Timestamp)
func (*DBlockHeader) SetVersion ¶
func (h *DBlockHeader) SetVersion(version byte)
func (*DBlockHeader) String ¶
func (e *DBlockHeader) String() string
func (*DBlockHeader) UnmarshalBinary ¶
func (b *DBlockHeader) UnmarshalBinary(data []byte) (err error)
func (*DBlockHeader) UnmarshalBinaryData ¶
func (b *DBlockHeader) UnmarshalBinaryData(data []byte) ([]byte, error)
type DirectoryBlock ¶
type DirectoryBlock struct { //Not Marshalized DBHash interfaces.IHash `json:"dbhash"` KeyMR interfaces.IHash `json:"keymr"` HeaderHash interfaces.IHash `json:"headerhash"` //Marshalized Header interfaces.IDirectoryBlockHeader `json:"header"` DBEntries []interfaces.IDBEntry `json:"dbentries"` // contains filtered or unexported fields }
func (*DirectoryBlock) AddEntry ¶
func (b *DirectoryBlock) AddEntry(chainID interfaces.IHash, keyMR interfaces.IHash) error
func (*DirectoryBlock) BodyKeyMR ¶
func (b *DirectoryBlock) BodyKeyMR() (rval interfaces.IHash)
func (*DirectoryBlock) BuildBodyMR ¶
func (b *DirectoryBlock) BuildBodyMR() (interfaces.IHash, error)
func (*DirectoryBlock) BuildKeyMerkleRoot ¶
func (b *DirectoryBlock) BuildKeyMerkleRoot() (keyMR interfaces.IHash, err error)
func (*DirectoryBlock) CheckDBEntries ¶
func (c *DirectoryBlock) CheckDBEntries() error
func (*DirectoryBlock) DatabasePrimaryIndex ¶
func (c *DirectoryBlock) DatabasePrimaryIndex() (rval interfaces.IHash)
func (*DirectoryBlock) DatabaseSecondaryIndex ¶
func (c *DirectoryBlock) DatabaseSecondaryIndex() (rval interfaces.IHash)
func (*DirectoryBlock) GetChainID ¶
func (c *DirectoryBlock) GetChainID() (rval interfaces.IHash)
func (*DirectoryBlock) GetDBEntries ¶
func (c *DirectoryBlock) GetDBEntries() []interfaces.IDBEntry
func (*DirectoryBlock) GetDatabaseHeight ¶
func (c *DirectoryBlock) GetDatabaseHeight() uint32
func (*DirectoryBlock) GetEBlockDBEntries ¶
func (c *DirectoryBlock) GetEBlockDBEntries() []interfaces.IDBEntry
func (*DirectoryBlock) GetEntryHashes ¶
func (c *DirectoryBlock) GetEntryHashes() []interfaces.IHash
func (*DirectoryBlock) GetEntryHashesForBranch ¶
func (c *DirectoryBlock) GetEntryHashesForBranch() []interfaces.IHash
func (*DirectoryBlock) GetEntrySigHashes ¶
func (c *DirectoryBlock) GetEntrySigHashes() []interfaces.IHash
func (*DirectoryBlock) GetFullHash ¶
func (b *DirectoryBlock) GetFullHash() (rval interfaces.IHash)
func (*DirectoryBlock) GetHash ¶
func (b *DirectoryBlock) GetHash() (rval interfaces.IHash)
func (*DirectoryBlock) GetHeader ¶
func (c *DirectoryBlock) GetHeader() interfaces.IDirectoryBlockHeader
func (*DirectoryBlock) GetHeaderHash ¶
func (b *DirectoryBlock) GetHeaderHash() (interfaces.IHash, error)
func (*DirectoryBlock) GetKeyMR ¶
func (c *DirectoryBlock) GetKeyMR() (rval interfaces.IHash)
func (*DirectoryBlock) GetTimestamp ¶
func (h *DirectoryBlock) GetTimestamp() interfaces.Timestamp
func (*DirectoryBlock) Init ¶
func (c *DirectoryBlock) Init()
func (*DirectoryBlock) IsSameAs ¶
func (a *DirectoryBlock) IsSameAs(b interfaces.IDirectoryBlock) bool
func (*DirectoryBlock) JSONByte ¶
func (e *DirectoryBlock) JSONByte() ([]byte, error)
func (*DirectoryBlock) JSONString ¶
func (e *DirectoryBlock) JSONString() (string, error)
func (*DirectoryBlock) MarshalBinary ¶
func (b *DirectoryBlock) MarshalBinary() (rval []byte, err error)
func (DirectoryBlock) MarshalJSON ¶
func (e DirectoryBlock) MarshalJSON() ([]byte, error)
func (*DirectoryBlock) New ¶
func (c *DirectoryBlock) New() interfaces.BinaryMarshallableAndCopyable
func (*DirectoryBlock) SetABlockHash ¶
func (c *DirectoryBlock) SetABlockHash(aBlock interfaces.IAdminBlock) error
func (*DirectoryBlock) SetDBEntries ¶
func (c *DirectoryBlock) SetDBEntries(dbEntries []interfaces.IDBEntry) error
func (*DirectoryBlock) SetECBlockHash ¶
func (c *DirectoryBlock) SetECBlockHash(ecBlock interfaces.IEntryCreditBlock) error
func (*DirectoryBlock) SetEntryHash ¶
func (c *DirectoryBlock) SetEntryHash(hash, chainID interfaces.IHash, index int)
func (*DirectoryBlock) SetFBlockHash ¶
func (c *DirectoryBlock) SetFBlockHash(fBlock interfaces.IFBlock) error
func (*DirectoryBlock) SetHeader ¶
func (c *DirectoryBlock) SetHeader(header interfaces.IDirectoryBlockHeader)
func (*DirectoryBlock) String ¶
func (e *DirectoryBlock) String() string
func (*DirectoryBlock) UnmarshalBinary ¶
func (b *DirectoryBlock) UnmarshalBinary(data []byte) (err error)
func (*DirectoryBlock) UnmarshalBinaryData ¶
func (b *DirectoryBlock) UnmarshalBinaryData(data []byte) ([]byte, error)
type ExpandedDBlock ¶
type ExpandedDBlock DirectoryBlock
type ExpandedDBlockHeader ¶
type ExpandedDBlockHeader DBlockHeader
Source Files ¶
Click to show internal directories.
Click to hide internal directories.