core

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const AfterPreShuffleEvent = "dandelion.DummyConsensus.Event.AfterPreShuffle"
View Source
const BeforePreShuffleEvent = "dandelion.DummyConsensus.Event.BeforePreShuffle"
View Source
const DummyConsensusName = "dandelion.DummyConsensus"

Variables

View Source
var ErrorTransactionNotFound = errors.New("transaction not found in block")

Functions

This section is empty.

Types

type DandelionCore

type DandelionCore struct {
	// contains filtered or unexported fields
}

func NewDandelionCore

func NewDandelionCore(logger *logrus.Logger, enablePlugins bool, sqlPlugins []string) *DandelionCore

func (*DandelionCore) ChainId

func (d *DandelionCore) ChainId() prototype.ChainId

func (*DandelionCore) Consensus

func (d *DandelionCore) Consensus() *DummyConsensus

func (*DandelionCore) Database

func (*DandelionCore) GetAccountKey

func (d *DandelionCore) GetAccountKey(name string) *prototype.PrivateKeyType

func (*DandelionCore) GetTrxReceipt

func (*DandelionCore) Head

func (d *DandelionCore) Head() (blockId common.BlockID)

func (*DandelionCore) NewSignedTransaction

func (d *DandelionCore) NewSignedTransaction(privateKey *prototype.PrivateKeyType, operations ...*prototype.Operation) (*prototype.SignedTransaction, error)

func (*DandelionCore) Node

func (d *DandelionCore) Node() *node.Node

func (*DandelionCore) NodeConfig

func (d *DandelionCore) NodeConfig() *node.Config

func (*DandelionCore) ProduceBlocks

func (d *DandelionCore) ProduceBlocks(count int) error

func (*DandelionCore) PushBlock

func (d *DandelionCore) PushBlock(trxWrappers ...*prototype.TransactionWrapper) (block *prototype.SignedBlock, err error)

func (*DandelionCore) PutAccount

func (d *DandelionCore) PutAccount(name string, key *prototype.PrivateKeyType)

func (*DandelionCore) SendRawTrx

func (*DandelionCore) SendTrx

func (d *DandelionCore) SendTrx(privateKey *prototype.PrivateKeyType, operations ...*prototype.Operation) error

func (*DandelionCore) SendTrxByAccount

func (d *DandelionCore) SendTrxByAccount(name string, operations ...*prototype.Operation) error

func (*DandelionCore) SendTrxByAccountEx

func (d *DandelionCore) SendTrxByAccountEx(name string, operations ...*prototype.Operation) (*prototype.TransactionReceiptWithInfo, error)

func (*DandelionCore) SendTrxEx

func (*DandelionCore) SendTrxEx2

func (*DandelionCore) Start

func (d *DandelionCore) Start() (err error)

func (*DandelionCore) Stop

func (d *DandelionCore) Stop() error

func (*DandelionCore) SubscribePreShuffle

func (d *DandelionCore) SubscribePreShuffle(beforeOrAfter bool, f interface{})

func (*DandelionCore) TrxPool

func (d *DandelionCore) TrxPool() iservices.ITrxPool

func (*DandelionCore) TrxReceipt

func (*DandelionCore) TrxReceiptByAccount

func (d *DandelionCore) TrxReceiptByAccount(name string, operations ...*prototype.Operation) *prototype.TransactionReceiptWithInfo

func (*DandelionCore) UnsubscribePreShuffle

func (d *DandelionCore) UnsubscribePreShuffle(beforeOrAfter bool, f interface{})

type DummyConsensus

type DummyConsensus struct {
	// contains filtered or unexported fields
}

func NewDummyConsensus

func NewDummyConsensus(ctx *node.ServiceContext) (*DummyConsensus, error)

func (*DummyConsensus) GetProducer

func (c *DummyConsensus) GetProducer(num uint64) string

func (*DummyConsensus) Start

func (c *DummyConsensus) Start(node *node.Node) error

func (*DummyConsensus) Stop

func (c *DummyConsensus) Stop() error

Jump to

Keyboard shortcuts

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