Skip to content

Commit

Permalink
graph, graphql: Removed dead code, and fix dependancy
Browse files Browse the repository at this point in the history
  • Loading branch information
jubeless committed Aug 11, 2021
1 parent 75e9df7 commit ce8d71a
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 17 deletions.
144 changes: 141 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ diesel_derives = "1.4"
chrono = "0.4.19"
Inflector = "0.11.3"
isatty = "0.1.9"
reqwest = { version = "0.11.2", features = ["json", "stream", "multipart"] }
reqwest = { version = "0.11.2", features = ["json", "stream", "multipart", "trust-dns-resolver"] }

# master contains changes such as
# https://github.com/paritytech/ethabi/pull/140, which upstream does not want
Expand Down Expand Up @@ -48,7 +48,7 @@ slog-term = "2.7.0"
petgraph = "0.6.0"
tiny-keccak = "1.5.0"
tokio = { version = "1.9.0", features = ["time", "sync", "macros", "test-util", "rt-multi-thread"] }
tokio-stream = { version = "0.1.6", features = ["sync"] }
tokio-stream = { version = "0.1.7", features = ["sync"] }
tokio-retry = "0.3.0"
url = "2.2.1"
prometheus = "0.12.0"
Expand Down
17 changes: 7 additions & 10 deletions graph/src/blockchain/block_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,18 +703,15 @@ impl<C: Blockchain> Stream for BlockStream<C> {
}

// Pausing after an error, before looking for more blocks
BlockStreamState::RetryAfterDelay(ref mut delay) => {
match delay.as_mut().poll(cx) {
Poll::Ready(Ok(..)) | Poll::Ready(Err(_)) => {
self.state = BlockStreamState::BeginReconciliation;
}
BlockStreamState::RetryAfterDelay(ref mut delay) => match delay.as_mut().poll(cx) {
Poll::Ready(Ok(..)) | Poll::Ready(Err(_)) => {
self.state = BlockStreamState::BeginReconciliation;
}

Poll::Pending => {
// self.state = BlockStreamState::RetryAfterDelay(delay);
break Poll::Pending;
}
Poll::Pending => {
break Poll::Pending;
}
}
},

// Waiting for a chain head update
BlockStreamState::Idle => {
Expand Down
2 changes: 0 additions & 2 deletions graphql/tests/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1319,10 +1319,8 @@ fn subscription_gets_result_even_without_events() {
let results: Vec<_> = stream
.take(1)
.collect()
// .map(Result::<_, ()>::Ok)
.timeout(Duration::from_secs(3))
.await
// .unwrap()
.unwrap();

assert_eq!(results.len(), 1);
Expand Down

0 comments on commit ce8d71a

Please sign in to comment.