public bool Validate(SignedTransaction signed) { var timestamp = LedgerService.LedgerManager.GetLedgerBeginTime(); // validate format if (!ValidateFormat(signed)) { return(false); } // validate expiration // TODO use end time and not begin time if (!ValidateExpiration(signed.Transaction, timestamp)) { return(false); } // validate signature if (!signed.CheckSignatures(LiveService.SignatureManager.TransactionRequiredValidationFactory, LedgerService.LedgerManager.Network, timestamp, LedgerService.LedgerManager.LedgerState)) { return(false); } return(Validate(signed.Transaction)); }
protected bool CheckSignatures(SignedTransaction signed, long timestamp = 0) { if (timestamp == 0) { timestamp = DateTime.UtcNow.ToUnixTimestamp(); } return(signed.CheckSignatures(TransactionRequiredValidationFactory.Instance, Network, timestamp)); }