tools

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2018 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CycleQueue

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

func NewQueue

func NewQueue(quesuSize uint64, maxItemPerGet uint64) *CycleQueue

func (*CycleQueue) Consumer

func (cq *CycleQueue) Consumer() []interface{}

func (*CycleQueue) Count

func (cq *CycleQueue) Count() uint64

func (*CycleQueue) GetGpos

func (cq *CycleQueue) GetGpos() uint64

func (*CycleQueue) GetPpos

func (cq *CycleQueue) GetPpos() uint64

func (*CycleQueue) Producer

func (cq *CycleQueue) Producer(value interface{})
func pirntInfo(value interface{}, put bool, c *CycleQueue) {
	tx := value.(*types.Transaction)
	if put {
		log.Debug("put item[%d]: %d and hash is %x.",
			c.ppos, tx.Data.AccountNonce, common.TxHash(tx))
	} else {
		log.Debug("get item[%d]: %d and hash is %x.",
			c.gpos, tx.Data.AccountNonce, common.TxHash(tx))
	}
}

Jump to

Keyboard shortcuts

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