ValidateTx validates a transaction.
(tx *bc.Tx, initialBlockID bc.Hash)
| 515 | |
| 516 | // ValidateTx validates a transaction. |
| 517 | func 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 | } |