Documentation ¶
Index ¶
- func Checker(item interface{}, value interface{}) bool
- func RebuildBlockID(forBlock Block) (bkID model.Hash, err error)
- func RebuildNonce(forBlock Block, idkey string) (nonce model.Hash, err error)
- func RebuildOblivionHash(forBlock Block) (bkOblivionHash string, err error)
- type Block
- func (bk *Block) BuildHeader(idkey string, decompressedPublicKey []byte, privateKey []byte) error
- func (bk *Block) BuildNonce(idkey string) error
- func (bk *Block) CreateBlockID() error
- func (bk Block) Dump()
- func (bk Block) DumpByte() ([]byte, error)
- func (bk *Block) GenerateOblivionHash() error
- func (bk Block) GetByteArrayValues() (values [][]byte)
- func (bk *Block) IsEmpty() bool
- type Blocks
- type Header
- type LastMiners
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checker ¶
func Checker(item interface{}, value interface{}) bool
Checker is a function to be sent to concurrent.Slice.Check to compare the ID of both blocks. Item will be the original and Value will be either the new block we're trying to compare, its ID as a `Hash`, or its oblivionHash string.
func RebuildBlockID ¶
RebuildBlockID ...
func RebuildNonce ¶
RebuildNonce ...
func RebuildOblivionHash ¶
RebuildOblivionHash ...
Types ¶
type Block ¶
type Block struct { BlockID model.Hash `json:"blockId"` Header Header `json:"header"` PreviousBlockID model.Hash `json:"previousBlockId"` Timestamp uint64 `json:"timestamp"` PeriodID uint64 `json:"periodId"` Transactions transaction.Transactions `json:"transactions"` OblivionHash string `json:"oblivionHash,omitempty"` }
Block ...
func (*Block) BuildHeader ¶
BuildHeader ...
func (*Block) GenerateOblivionHash ¶
GenerateOblivionHash ...
func (Block) GetByteArrayValues ¶
GetByteArrayValues ...
Click to show internal directories.
Click to hide internal directories.