Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BlockLock = sync.Mutex{}
BlockLock is used to lock block processing to a single parent thread.
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 ¶
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.