storage

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: AGPL-3.0 Imports: 3 Imported by: 8 modules, 29 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package storage is a generated protocol buffer package.

It is generated from these files:

storage.proto

It has these top-level messages:

UtxoEntry
Mainchain

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mainchain

type Mainchain struct {
	Hashs []*Mainchain_Hash `protobuf:"bytes,1,rep,name=hashs" json:"hashs,omitempty"`
}

Mainchain represents a mainchain of the blockchain

func (*Mainchain) Descriptor

func (*Mainchain) Descriptor() ([]byte, []int)

func (*Mainchain) GetHashs

func (m *Mainchain) GetHashs() []*Mainchain_Hash

func (*Mainchain) ProtoMessage

func (*Mainchain) ProtoMessage()

func (*Mainchain) Reset

func (m *Mainchain) Reset()

func (*Mainchain) String

func (m *Mainchain) String() string

type Mainchain_Hash

type Mainchain_Hash struct {
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (*Mainchain_Hash) Descriptor

func (*Mainchain_Hash) Descriptor() ([]byte, []int)

func (*Mainchain_Hash) GetKey

func (m *Mainchain_Hash) GetKey() []byte

func (*Mainchain_Hash) ProtoMessage

func (*Mainchain_Hash) ProtoMessage()

func (*Mainchain_Hash) Reset

func (m *Mainchain_Hash) Reset()

func (*Mainchain_Hash) String

func (m *Mainchain_Hash) String() string

type UtxoEntry

type UtxoEntry struct {
	IsCoinBase  bool   `protobuf:"varint,1,opt,name=isCoinBase" json:"isCoinBase,omitempty"`
	BlockHeight uint64 `protobuf:"varint,2,opt,name=blockHeight" json:"blockHeight,omitempty"`
	Spent       bool   `protobuf:"varint,3,opt,name=spent" json:"spent,omitempty"`
}

func NewUtxoEntry

func NewUtxoEntry(isCoinBase bool, blockHeight uint64, spent bool) *UtxoEntry

NewUtxoEntry will create a new utxo entry

func (*UtxoEntry) Descriptor

func (*UtxoEntry) Descriptor() ([]byte, []int)

func (*UtxoEntry) GetBlockHeight

func (m *UtxoEntry) GetBlockHeight() uint64

func (*UtxoEntry) GetIsCoinBase

func (m *UtxoEntry) GetIsCoinBase() bool

func (*UtxoEntry) GetSpent

func (m *UtxoEntry) GetSpent() bool

func (*UtxoEntry) ProtoMessage

func (*UtxoEntry) ProtoMessage()

func (*UtxoEntry) Reset

func (m *UtxoEntry) Reset()

func (*UtxoEntry) SpendOutput

func (entry *UtxoEntry) SpendOutput()

SpendOutput marks the output at the provided index as spent

func (*UtxoEntry) String

func (m *UtxoEntry) String() string

func (*UtxoEntry) UnspendOutput

func (entry *UtxoEntry) UnspendOutput()

UnspendOutput marks the output at the provided index as unspent

Jump to

Keyboard shortcuts

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