Remove rayon from rest_api (#1562)

## Issue Addressed

NA

## Proposed Changes

Addresses a deadlock condition described here: https://hackmd.io/ijQlqOdqSGaWmIo6zMVV-A?view

## Additional Info

NA
This commit is contained in:
Paul Hauner 2020-08-24 07:28:54 +00:00
parent c895dc8971
commit 3569506acd
3 changed files with 2 additions and 5 deletions

1
Cargo.lock generated
View File

@ -4285,7 +4285,6 @@ dependencies = [
"node_test_rig",
"operation_pool",
"parking_lot 0.11.0",
"rayon",
"remote_beacon_node",
"rest_types",
"serde",

View File

@ -34,7 +34,6 @@ hex = "0.4.2"
parking_lot = "0.11.0"
futures = "0.3.5"
operation_pool = { path = "../operation_pool" }
rayon = "1.3.0"
environment = { path = "../../lighthouse/environment" }
uhttp_sse = "0.5.1"
bus = "2.2.3"

View File

@ -8,7 +8,6 @@ use bls::PublicKeyBytes;
use eth2_libp2p::PubsubMessage;
use hyper::Request;
use network::NetworkMessage;
use rayon::prelude::*;
use rest_types::{ValidatorDutiesRequest, ValidatorDutyBytes, ValidatorSubscription};
use slog::{error, info, trace, warn, Logger};
use std::sync::Arc;
@ -437,7 +436,7 @@ pub fn publish_attestations<T: BeaconChainTypes>(
.map(
move |attestations: Vec<(Attestation<T::EthSpec>, SubnetId)>| {
attestations
.into_par_iter()
.into_iter()
.enumerate()
.map(|(i, (attestation, subnet_id))| {
process_unaggregated_attestation(
@ -546,7 +545,7 @@ pub fn publish_aggregate_and_proofs<T: BeaconChainTypes>(
.map(
move |signed_aggregates: Vec<SignedAggregateAndProof<T::EthSpec>>| {
signed_aggregates
.into_par_iter()
.into_iter()
.enumerate()
.map(|(i, signed_aggregate)| {
process_aggregated_attestation(