VerifyTransaction verifys received single transaction
(tx *types.Transaction)
| 38 | |
| 39 | // VerifyTransaction verifys received single transaction |
| 40 | func VerifyTransaction(tx *types.Transaction) ontErrors.ErrCode { |
| 41 | if err := checkTransactionSignatures(tx); err != nil { |
| 42 | log.Info("transaction verify error:", err) |
| 43 | return ontErrors.ErrVerifySignature |
| 44 | } |
| 45 | |
| 46 | if err := checkTransactionPayload(tx); err != nil { |
| 47 | log.Warn("[VerifyTransaction],", err) |
| 48 | return ontErrors.ErrTransactionPayload |
| 49 | } |
| 50 | |
| 51 | return ontErrors.ErrNoError |
| 52 | } |
| 53 | |
| 54 | func VerifyTransactionWithLedger(tx *types.Transaction, ledger *ledger.Ledger) ontErrors.ErrCode { |
| 55 | //TODO: replay check |
no test coverage detected