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 GetValueAsJSON ¶ added in v1.7.0
func GetValueAsJSON(helper claim.ClaimHelper) (string, error)
GetValueAsJSON returns the JSON string of the structure of claim metadata.
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 ¶
type Metadata ¶ added in v1.7.0
type Metadata struct { Author string `json:"author"` Title string `json:"title"` Description string `json:"description"` NSFW bool `json:"nsfw"` }
Metadata holds information that is used via the table column it is assigned for backwards compatibility.
type Source ¶ added in v1.7.0
type Source struct {
ContentType string `json:"contentType"`
}
Source holds the media type of the claim