Feature #2734
Updated by Junxiao Shi over 9 years ago
SegmentFetcher::fetch uses a verifySegment callback which returns a Data validation result synchronously. But verifying a Data packet may require network operations to fetch certificates. **`SegmentFetcher` verifySegment should accept a `Validator` instance, and use its asynchronous validation API**. be asynchronous, similar to Validator.validate. typedef function<void (const Data& data, const OnDataValidated& onValidated, const OnDataValidationFailed& onValidationFailed)> VerifySegment; SegmentFetcher is a simple procedure that fetches one segment at a time. To keep it simple, when validation verifySegment is in progress, the next segment need not be fetched.