block

package
v0.4.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2017 License: ISC Imports: 21 Imported by: 0

Documentation

Overview

current block data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOwnership added in v0.2.0

func CreateOwnership(issueTxId merkle.Digest, issueBlockNumber uint64, assetIndex transactionrecord.AssetIndex, newOwner *account.Account)

func DeleteDownToBlock added in v0.2.0

func DeleteDownToBlock(finalBlockNumber uint64) error

delete from current highest block down to and including the specified block

func DigestForBlock added in v0.2.0

func DigestForBlock(number uint64) (blockdigest.Digest, error)

func Finalise

func Finalise() error

shudown the block system

func Get

func Get() (blockdigest.Digest, uint64)

get block data for initialising a new block returns: previous block digest and the number for the new block

func GetHeight added in v0.2.0

func GetHeight() uint64

get the current height

func Initialise

func Initialise() error

setup the current block data

func OwnerOf added in v0.2.0

func OwnerOf(txId merkle.Digest) *account.Account

find the owner of a specific transaction (only issue or transfer is allowed)

func StoreIncoming added in v0.2.0

func StoreIncoming(packedBlock []byte) error

store an incoming block checking to make sure it is valid first

func TransferOwnership added in v0.2.0

func TransferOwnership(previousTxId merkle.Digest, transferTxId merkle.Digest, transferBlockNumber uint64, currentOwner *account.Account, newOwner *account.Account)

need to have a lock

Types

type Ownership added in v0.2.0

type Ownership struct {
	N          uint64                       `json:"n,string"`
	TxId       merkle.Digest                `json:"txId"`
	IssueTxId  merkle.Digest                `json:"issue"`
	AssetIndex transactionrecord.AssetIndex `json:"index"`
}

type to represent an ownership record

func ListBitmarksFor added in v0.2.0

func ListBitmarksFor(owner *account.Account, start uint64, count int) ([]Ownership, error)

fetch a list of bitmarks for an owner

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL