processing

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2019 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlockLock = sync.Mutex{}

BlockLock is used to lock block processing to a single parent thread.

View Source
var MaxFailures int

MaxFailures tells Chainquery how many failures a transaction can have before we rollback the block and try to process it it again. This is to stop an indefinite loop. Since transactions can be dependant on one another they can fail if not processed in the right order. We allow parallel processing by putting transactions into a queue, and if they fail to process, for example if its dependant transaction has not been processed yet, then we allow to go back into the queue x times ( MaxFailures ).

Functions

func ProcessTx

func ProcessTx(jsonTx *lbrycrd.TxRawResult, blockTime uint64, blockHeight uint64) error

ProcessTx processes an individual transaction from a block.

func RunBlockProcessing

func RunBlockProcessing(height uint64) uint64

RunBlockProcessing runs the processing of a block at a specific height. While any height can be passed in it is important to note that if the previous block is not processed it will panic to prevent corruption because blocks must be processed in order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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