MCPcopy Create free account
hub / github.com/chain/Core / ValidateTx

Function ValidateTx

protocol/validation/validation.go:517–526  ·  view source on GitHub ↗

ValidateTx validates a transaction.

(tx *bc.Tx, initialBlockID bc.Hash)

Source from the content-addressed store, hash-verified

515
516// ValidateTx validates a transaction.
517func ValidateTx(tx *bc.Tx, initialBlockID bc.Hash) error {
518 vs := &validationState{
519 blockchainID: initialBlockID,
520 tx: tx,
521 entryID: tx.ID,
522
523 cache: make(map[bc.Hash]error),
524 }
525 return checkValid(vs, tx.TxHeader)
526}

Callers 2

TestNoncelessIssuanceFunction · 0.85

Calls 1

checkValidFunction · 0.85

Tested by 2

TestNoncelessIssuanceFunction · 0.68