 
                 let semaphore = DispatchSemaphore (value: 0)
 
-                //            var moreResults = false
-                var begBlockNumber = begBlockNumber
-
-                for begHeight in stride (from: begBlockNumber, to: endBlockNumber, by: 5000) {
-                    if nil != error { break }
-                    queryVals[1] = begHeight.description
-                    queryVals[2] = min (begHeight + 5000, endBlockNumber).description
-
-                    //                moreResults = false
-
-                    self.bdbMakeRequest (path: "transactions", query: zip (queryKeys, queryVals)) {
+                var nextURL: URL? = nil
+
+                queryVals[1] = begBlockNumber.description
+                queryVals[2] = endBlockNumber.description
+
+                // Make the first request.  Ideally we'll get all the transactions in one gulp
+                self.bdbMakeRequest (path: "transactions", query: zip (queryKeys, queryVals)) {
+                    (more: URL?, res: Result<[JSON], QueryError>) in
+
+                    // Append `transactions` with the resulting transactions.
+                    results += try! res
+                        .flatMap { BlockChainDB.getManyExpected(data: $0, transform: Model.asTransaction) }
+                        .recover { error = $0; return [] }.get()
+
+                    nextURL = more
+
+                    semaphore.signal()
+                }
+
+                // Wait for the first request
+                semaphore.wait()
+
+                // Loop until all 'nextURL' values are queried
+                while let url = nextURL, nil == error {
+                    self.bdbMakeRequest (url: url, embedded: true, embeddedPath: "transactions") {
                         (more: URL?, res: Result<[JSON], QueryError>) in
-                        // Flag if `more`
-                        //                    moreResults = more
 
                         // Append `transactions` with the resulting transactions.
                         results += try! res
                             .flatMap { BlockChainDB.getManyExpected(data: $0, transform: Model.asTransaction) }
                             .recover { error = $0; return [] }.get()
 
-                        if let _ = more, nil == error {
-                            begBlockNumber = results.reduce(0) {
-                                max ($0, ($1.blockHeight ?? 0))
-                            }
-                        }
+                        nextURL = more
 
                         semaphore.signal()
                     }

        print ("SYS: BDB:Request: \(url.absoluteString): Method: \(httpMethod): Data: \(data?.description ?? "[]")")

        var request = URLRequest (url: url)
        request.addValue ("application/json", forHTTPHeaderField: "accept")
        request.addValue ("application/json", forHTTPHeaderField: "Content-Type")
        request.httpMethod = httpMethod

        // If we have data as a JSON.Dict, then add it as the httpBody to the request.
        if let data = data {

        }

        sendRequest (request, dataTaskFunc, completion: completion)
    }

    /// We have two flavors of bdbMakeRequest but they both handle their result identically.
    /// Provide this helper function to process the JSON result to extract the content and then
    /// to call the completion handler.
    internal func bdbHandleResult (_ res: Result<JSON.Dict, QueryError>,
                                   embedded: Bool = true,
                                   embeddedPath path: String,
                                   completion: @escaping (URL?, Result<[JSON], QueryError>) -> Void) {
        let res = res.map { JSON (dict: $0) }

        // Determine is there are more results for this query.  The BlockChainDB
        // will provide a "_links" JSON dictionary with a "next" field that provides
        // a URL to use for the remaining values.  The "_links" dictionary looks
        // like
        // "_links":{ "next": { "href": <url> },
        //            "self": { "href": <url> }}

        let moreURL = try? res
            .map {  $0.asJSON (name: "_links") }
            .map { $0?.asJSON (name: "next")   }
            .map { $0?.asString(name: "href")  }      // -> Result<String?, ...>
            .map { $0.flatMap { URL (string: $0) } }  // -> Result<URL?,    ...>
            .recover { (ignore) in return nil }       // -> ...
            .get ()
        // moreURL will be `nil` if `res` was not .success

        // Invoke the callback with `moreURL` and Result with [JSON]
        completion (moreURL,
                    res.flatMap { (json: JSON) -> Result<[JSON], QueryError> in
                        let json = (embedded
                            ? (json.asDict(name: "_embedded")?[path] ?? [])
                            : [json.dict])

                        guard let data = json as? [JSON.Dict]
                            else { return Result.failure(QueryError.model ("[JSON.Dict] expected")) }

                        return Result.success (data.map { JSON (dict: $0) })
        })
    }

    /// In the case where a BDB request has 'paged' (with more results than and be returned in
    /// one query, the BDB will give us a URL to use for the next page.  Thus this function
    /// is identical to the following bdbMakeReqeust(path:query:embedded:completion) except that
    /// instead of building a URL, we've got a URL.  In this function, we need to pass in
    /// the 'embeddedPath' so that the JSON parser can find the data.
    internal func bdbMakeRequest (url: URL,
                                  embedded: Bool = true,
                                  embeddedPath: String,
                                  completion: @escaping (URL?, Result<[JSON], QueryError>) -> Void) {
        makeRequest(bdbDataTaskFunc, url: url, httpMethod: "GET") {
            self.bdbHandleResult ($0, embedded: embedded, embeddedPath: embeddedPath, completion: completion)
        }
    }

    internal func bdbMakeRequest (path: String,
