Skip to content

Commit

Permalink
Merge branch 'feature/network/whitelist_peers' into feature/api/white…
Browse files Browse the repository at this point in the history
…list
  • Loading branch information
AureliaDolo committed Mar 10, 2022
2 parents 4759df8 + 984e198 commit ea0bfa4
Show file tree
Hide file tree
Showing 101 changed files with 2,461 additions and 2,102 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ jobs:
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features

# Full cross-platform tests required by bors to merge on main branch
full:
Expand Down
84 changes: 57 additions & 27 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ members = [
"massa-hash",
"massa-logging",
"massa-models",
"massa-network",
"massa-network-worker",
"massa-network-exports",
"massa-node",
"massa-sdk",
"massa-pool",
"massa-proof-of-stake-exports",
"massa-protocol-exports",
Expand Down
4 changes: 2 additions & 2 deletions massa-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ massa_execution_exports = { path = "../massa-execution-exports" }
massa_graph = { path = "../massa-graph" }
massa_hash = { path = "../massa-hash" }
massa_models = { path = "../massa-models" }
massa_network = { path = "../massa-network" }
massa_network_exports = { path = "../massa-network-exports" }
massa_pool = { path = "../massa-pool" }
massa_protocol_exports = { path = "../massa-protocol-exports" }
massa_signature = { path = "../massa-signature" }
massa_time = { path = "../massa-time" }

[features]
instrument = ["tokio/tracing", "massa_consensus_exports/instrument", "massa_graph/instrument", "massa_models/instrument", "massa_network/instrument", "massa_pool/instrument", "massa_protocol_exports/instrument", "massa_time/instrument"]
instrument = ["tokio/tracing", "massa_consensus_exports/instrument", "massa_graph/instrument", "massa_models/instrument", "massa_network_exports/instrument", "massa_pool/instrument", "massa_protocol_exports/instrument", "massa_time/instrument"]
2 changes: 1 addition & 1 deletion massa-api/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use massa_consensus_exports::error::ConsensusError;
use massa_execution_exports::ExecutionError;
use massa_hash::MassaHashError;
use massa_models::ModelsError;
use massa_network::NetworkError;
use massa_network_exports::NetworkError;
use massa_pool::PoolError;
use massa_time::TimeError;
use thiserror::Error;
Expand Down
11 changes: 7 additions & 4 deletions massa-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ use massa_models::clique::Clique;
use massa_models::composite::PubkeySig;
use massa_models::execution::ExecuteReadOnlyResponse;
use massa_models::node::NodeId;
use massa_models::operation::{Operation, OperationId};
use massa_models::operation::OperationId;
use massa_models::output_event::SCOutputEvent;
use massa_models::prehash::{Map, Set};
use massa_models::{Address, BlockId, EndorsementId, Version};
use massa_network::{NetworkCommandSender, NetworkSettings};
use massa_models::{Address, BlockId, EndorsementId, SignedOperation, Version};
use massa_network_exports::{NetworkCommandSender, NetworkSettings};
use massa_pool::PoolCommandSender;
use massa_signature::PrivateKey;
use std::net::{IpAddr, SocketAddr};
Expand Down Expand Up @@ -192,7 +192,10 @@ pub trait Endpoints {

/// Adds operations to pool. Returns operations that were ok and sent to pool.
#[rpc(name = "send_operations")]
fn send_operations(&self, _: Vec<Operation>) -> BoxFuture<Result<Vec<OperationId>, ApiError>>;
fn send_operations(
&self,
_: Vec<SignedOperation>,
) -> BoxFuture<Result<Vec<OperationId>, ApiError>>;

/// Get events optionnally filtered by:
/// * start slot
Expand Down
9 changes: 6 additions & 3 deletions massa-api/src/private.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use massa_models::composite::PubkeySig;
use massa_models::execution::ExecuteReadOnlyResponse;
use massa_models::output_event::SCOutputEvent;
use massa_models::prehash::{Map, Set};
use massa_models::{Address, BlockId, EndorsementId, Operation, OperationId};
use massa_network::NetworkCommandSender;
use massa_models::{Address, BlockId, EndorsementId, OperationId, SignedOperation};
use massa_network_exports::NetworkCommandSender;
use massa_signature::PrivateKey;
use std::net::{IpAddr, SocketAddr};

Expand Down Expand Up @@ -150,7 +150,10 @@ impl Endpoints for API<Private> {
crate::wrong_api::<Vec<AddressInfo>>()
}

fn send_operations(&self, _: Vec<Operation>) -> BoxFuture<Result<Vec<OperationId>, ApiError>> {
fn send_operations(
&self,
_: Vec<SignedOperation>,
) -> BoxFuture<Result<Vec<OperationId>, ApiError>> {
crate::wrong_api::<Vec<OperationId>>()
}

Expand Down
Loading

0 comments on commit ea0bfa4

Please sign in to comment.