mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 17:47:56 +00:00
sp-utils => sc-utils (#9677)
* sp-utils => sc-utils * cargo fmt * These files are now in the client so should be licensed as GPL3 * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Generated
+20
-20
@@ -7311,6 +7311,7 @@ dependencies = [
|
||||
"sc-service",
|
||||
"sc-telemetry",
|
||||
"sc-tracing",
|
||||
"sc-utils",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sp-blockchain",
|
||||
@@ -7319,7 +7320,6 @@ dependencies = [
|
||||
"sp-keystore",
|
||||
"sp-panic-handler",
|
||||
"sp-runtime",
|
||||
"sp-utils",
|
||||
"sp-version",
|
||||
"structopt",
|
||||
"tempfile",
|
||||
@@ -7340,6 +7340,7 @@ dependencies = [
|
||||
"parking_lot 0.11.1",
|
||||
"sc-executor",
|
||||
"sc-transaction-pool-api",
|
||||
"sc-utils",
|
||||
"sp-api",
|
||||
"sp-blockchain",
|
||||
"sp-consensus",
|
||||
@@ -7352,7 +7353,6 @@ dependencies = [
|
||||
"sp-storage",
|
||||
"sp-test-primitives",
|
||||
"sp-trie",
|
||||
"sp-utils",
|
||||
"substrate-prometheus-endpoint",
|
||||
"substrate-test-runtime",
|
||||
"thiserror",
|
||||
@@ -7397,6 +7397,7 @@ dependencies = [
|
||||
"log 0.4.14",
|
||||
"parking_lot 0.11.1",
|
||||
"sc-client-api",
|
||||
"sc-utils",
|
||||
"serde",
|
||||
"sp-api",
|
||||
"sp-blockchain",
|
||||
@@ -7405,7 +7406,6 @@ dependencies = [
|
||||
"sp-runtime",
|
||||
"sp-state-machine",
|
||||
"sp-test-primitives",
|
||||
"sp-utils",
|
||||
"substrate-prometheus-endpoint",
|
||||
"thiserror",
|
||||
]
|
||||
@@ -7751,6 +7751,7 @@ dependencies = [
|
||||
"sc-network-gossip",
|
||||
"sc-network-test",
|
||||
"sc-telemetry",
|
||||
"sc-utils",
|
||||
"serde_json",
|
||||
"sp-api",
|
||||
"sp-application-crypto",
|
||||
@@ -7763,7 +7764,6 @@ dependencies = [
|
||||
"sp-keystore",
|
||||
"sp-runtime",
|
||||
"sp-tracing",
|
||||
"sp-utils",
|
||||
"substrate-prometheus-endpoint",
|
||||
"substrate-test-runtime-client",
|
||||
"tempfile",
|
||||
@@ -7880,6 +7880,7 @@ dependencies = [
|
||||
"sc-client-api",
|
||||
"sc-consensus",
|
||||
"sc-peerset",
|
||||
"sc-utils",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"smallvec 1.6.1",
|
||||
@@ -7891,7 +7892,6 @@ dependencies = [
|
||||
"sp-runtime",
|
||||
"sp-test-primitives",
|
||||
"sp-tracing",
|
||||
"sp-utils",
|
||||
"substrate-prometheus-endpoint",
|
||||
"substrate-test-runtime",
|
||||
"substrate-test-runtime-client",
|
||||
@@ -7970,13 +7970,13 @@ dependencies = [
|
||||
"sc-network",
|
||||
"sc-transaction-pool",
|
||||
"sc-transaction-pool-api",
|
||||
"sc-utils",
|
||||
"sp-api",
|
||||
"sp-consensus",
|
||||
"sp-core",
|
||||
"sp-offchain",
|
||||
"sp-runtime",
|
||||
"sp-tracing",
|
||||
"sp-utils",
|
||||
"substrate-test-runtime-client",
|
||||
"threadpool",
|
||||
"tokio",
|
||||
@@ -7990,8 +7990,8 @@ dependencies = [
|
||||
"libp2p",
|
||||
"log 0.4.14",
|
||||
"rand 0.7.3",
|
||||
"sc-utils",
|
||||
"serde_json",
|
||||
"sp-utils",
|
||||
"wasm-timer",
|
||||
]
|
||||
|
||||
@@ -8024,6 +8024,7 @@ dependencies = [
|
||||
"sc-tracing",
|
||||
"sc-transaction-pool",
|
||||
"sc-transaction-pool-api",
|
||||
"sc-utils",
|
||||
"serde_json",
|
||||
"sp-api",
|
||||
"sp-blockchain",
|
||||
@@ -8035,7 +8036,6 @@ dependencies = [
|
||||
"sp-rpc",
|
||||
"sp-runtime",
|
||||
"sp-session",
|
||||
"sp-utils",
|
||||
"sp-version",
|
||||
"substrate-test-runtime-client",
|
||||
]
|
||||
@@ -8128,6 +8128,7 @@ dependencies = [
|
||||
"sc-tracing",
|
||||
"sc-transaction-pool",
|
||||
"sc-transaction-pool-api",
|
||||
"sc-utils",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sp-api",
|
||||
@@ -8147,7 +8148,6 @@ dependencies = [
|
||||
"sp-transaction-pool",
|
||||
"sp-transaction-storage-proof",
|
||||
"sp-trie",
|
||||
"sp-utils",
|
||||
"sp-version",
|
||||
"substrate-prometheus-endpoint",
|
||||
"substrate-test-runtime",
|
||||
@@ -8302,6 +8302,7 @@ dependencies = [
|
||||
"sc-block-builder",
|
||||
"sc-client-api",
|
||||
"sc-transaction-pool-api",
|
||||
"sc-utils",
|
||||
"serde",
|
||||
"sp-api",
|
||||
"sp-blockchain",
|
||||
@@ -8310,7 +8311,6 @@ dependencies = [
|
||||
"sp-runtime",
|
||||
"sp-tracing",
|
||||
"sp-transaction-pool",
|
||||
"sp-utils",
|
||||
"substrate-prometheus-endpoint",
|
||||
"substrate-test-runtime",
|
||||
"substrate-test-runtime-client",
|
||||
@@ -8331,6 +8331,16 @@ dependencies = [
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sc-utils"
|
||||
version = "4.0.0-dev"
|
||||
dependencies = [
|
||||
"futures 0.3.16",
|
||||
"futures-timer 3.0.2",
|
||||
"lazy_static",
|
||||
"prometheus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "schannel"
|
||||
version = "0.1.19"
|
||||
@@ -9476,16 +9486,6 @@ dependencies = [
|
||||
"trie-standardmap",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sp-utils"
|
||||
version = "4.0.0-dev"
|
||||
dependencies = [
|
||||
"futures 0.3.16",
|
||||
"futures-timer 3.0.2",
|
||||
"lazy_static",
|
||||
"prometheus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sp-version"
|
||||
version = "4.0.0-dev"
|
||||
|
||||
@@ -61,6 +61,7 @@ members = [
|
||||
"client/tracing/proc-macro",
|
||||
"client/transaction-pool",
|
||||
"client/transaction-pool/api",
|
||||
"client/utils",
|
||||
"frame/assets",
|
||||
"frame/atomic-swap",
|
||||
"frame/aura",
|
||||
@@ -180,7 +181,6 @@ members = [
|
||||
"primitives/transaction-pool",
|
||||
"primitives/transaction-storage-proof",
|
||||
"primitives/trie",
|
||||
"primitives/utils",
|
||||
"primitives/version",
|
||||
"primitives/version/proc-macro",
|
||||
"primitives/wasm-interface",
|
||||
|
||||
@@ -30,7 +30,7 @@ sp-database = { version = "4.0.0-dev", path = "../../primitives/database" }
|
||||
sp-core = { version = "4.0.0-dev", default-features = false, path = "../../primitives/core" }
|
||||
sp-keystore = { version = "0.10.0-dev", default-features = false, path = "../../primitives/keystore" }
|
||||
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
sp-runtime = { version = "4.0.0-dev", default-features = false, path = "../../primitives/runtime" }
|
||||
sp-state-machine = { version = "0.10.0-dev", path = "../../primitives/state-machine" }
|
||||
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
|
||||
|
||||
@@ -29,8 +29,8 @@ use std::{collections::HashSet, convert::TryFrom, fmt, sync::Arc};
|
||||
|
||||
use crate::{blockchain::Info, notifications::StorageEventStream};
|
||||
use sc_transaction_pool_api::ChainEvent;
|
||||
use sc_utils::mpsc::TracingUnboundedReceiver;
|
||||
use sp_blockchain;
|
||||
use sp_utils::mpsc::TracingUnboundedReceiver;
|
||||
|
||||
/// Type that implements `futures::Stream` of block import events.
|
||||
pub type ImportNotifications<Block> = TracingUnboundedReceiver<BlockImportNotification<Block>>;
|
||||
|
||||
@@ -25,9 +25,9 @@ use std::{
|
||||
|
||||
use fnv::{FnvHashMap, FnvHashSet};
|
||||
use prometheus_endpoint::{register, CounterVec, Opts, Registry, U64};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_core::storage::{StorageData, StorageKey};
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
|
||||
/// Storage change set
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -30,7 +30,7 @@ sc-client-api = { version = "4.0.0-dev", path = "../api" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sc-network = { version = "0.10.0-dev", path = "../network" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
sp-version = { version = "4.0.0-dev", path = "../../primitives/version" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-keystore = { version = "0.10.0-dev", path = "../../primitives/keystore" }
|
||||
|
||||
@@ -21,7 +21,7 @@ use chrono::prelude::*;
|
||||
use futures::{future, future::FutureExt, pin_mut, select, Future};
|
||||
use log::info;
|
||||
use sc_service::{Configuration, Error as ServiceError, TaskManager, TaskType};
|
||||
use sp_utils::metrics::{TOKIO_THREADS_ALIVE, TOKIO_THREADS_TOTAL};
|
||||
use sc_utils::metrics::{TOKIO_THREADS_ALIVE, TOKIO_THREADS_TOTAL};
|
||||
use std::marker::PhantomData;
|
||||
|
||||
#[cfg(target_family = "unix")]
|
||||
|
||||
@@ -24,7 +24,7 @@ sp-core = { path = "../../../primitives/core", version = "4.0.0-dev" }
|
||||
sp-consensus = { path = "../../../primitives/consensus/common", version = "0.10.0-dev" }
|
||||
sp-state-machine = { version = "0.10.0-dev", path = "../../../primitives/state-machine" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../../utils" }
|
||||
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
|
||||
parking_lot = "0.11.1"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Block import helpers.
|
||||
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Import Queue primitive: something which can verify and import blocks.
|
||||
//!
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
use futures::{
|
||||
prelude::*,
|
||||
task::{Context, Poll},
|
||||
@@ -21,12 +22,12 @@ use futures::{
|
||||
use futures_timer::Delay;
|
||||
use log::{debug, trace};
|
||||
use prometheus_endpoint::Registry;
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_consensus::BlockOrigin;
|
||||
use sp_runtime::{
|
||||
traits::{Block as BlockT, Header as HeaderT, NumberFor},
|
||||
Justification, Justifications,
|
||||
};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{marker::PhantomData, pin::Pin, time::Duration};
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Provides the `buffered_link` utility.
|
||||
//!
|
||||
@@ -39,8 +40,8 @@
|
||||
|
||||
use crate::import_queue::{Link, Origin};
|
||||
use futures::prelude::*;
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{
|
||||
pin::Pin,
|
||||
task::{Context, Poll},
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2020-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Metering tools for consensus
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ parity-scale-codec = { version = "2.0.0", features = ["derive"] }
|
||||
sp-application-crypto = { version = "4.0.0-dev", path = "../../primitives/application-crypto" }
|
||||
sp-arithmetic = { version = "4.0.0-dev", path = "../../primitives/arithmetic" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
|
||||
sc-consensus = { version = "0.10.0-dev", path = "../consensus/common" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
|
||||
@@ -94,7 +94,7 @@ use log::{debug, trace};
|
||||
use prometheus_endpoint::{register, CounterVec, Opts, PrometheusError, Registry, U64};
|
||||
use rand::seq::SliceRandom;
|
||||
use sc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_DEBUG};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
|
||||
use super::{benefit, cost, Round, SetId};
|
||||
use crate::{environment, CatchUp, CompactCommit, SignedMessage};
|
||||
|
||||
@@ -58,8 +58,8 @@ use crate::{
|
||||
use gossip::{
|
||||
FullCatchUpMessage, FullCommitMessage, GossipMessage, GossipValidator, PeerReport, VoteMessage,
|
||||
};
|
||||
use sc_utils::mpsc::TracingUnboundedReceiver;
|
||||
use sp_finality_grandpa::{AuthorityId, AuthoritySignature, RoundNumber, SetId as SetIdNumber};
|
||||
use sp_utils::mpsc::TracingUnboundedReceiver;
|
||||
|
||||
pub mod gossip;
|
||||
mod periodic;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use futures::{future::FutureExt as _, prelude::*, ready, stream::Stream};
|
||||
use futures_timer::Delay;
|
||||
use log::debug;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{
|
||||
pin::Pin,
|
||||
task::{Context, Poll},
|
||||
|
||||
@@ -28,10 +28,10 @@ use parity_scale_codec::Encode;
|
||||
use sc_network::{config::Role, Event as NetworkEvent, ObservedRole, PeerId};
|
||||
use sc_network_gossip::Validator;
|
||||
use sc_network_test::{Block, Hash};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_finality_grandpa::AuthorityList;
|
||||
use sp_keyring::Ed25519Keyring;
|
||||
use sp_runtime::traits::NumberFor;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
pin::Pin,
|
||||
|
||||
@@ -27,6 +27,7 @@ use sc_consensus::{
|
||||
BlockCheckParams, BlockImport, BlockImportParams, ImportResult, JustificationImport,
|
||||
};
|
||||
use sc_telemetry::TelemetryHandle;
|
||||
use sc_utils::mpsc::TracingUnboundedSender;
|
||||
use sp_api::{Core, RuntimeApiInfo, TransactionFor};
|
||||
use sp_blockchain::{well_known_cache_keys, BlockStatus};
|
||||
use sp_consensus::{BlockOrigin, Error as ConsensusError, SelectChain};
|
||||
@@ -37,7 +38,6 @@ use sp_runtime::{
|
||||
traits::{Block as BlockT, DigestFor, Header as HeaderT, NumberFor, Zero},
|
||||
Justification,
|
||||
};
|
||||
use sp_utils::mpsc::TracingUnboundedSender;
|
||||
|
||||
use crate::{
|
||||
authorities::{AuthoritySet, DelayKind, PendingChange, SharedAuthoritySet},
|
||||
|
||||
@@ -68,6 +68,7 @@ use sc_client_api::{
|
||||
};
|
||||
use sc_consensus::BlockImport;
|
||||
use sc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_DEBUG, CONSENSUS_INFO};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver};
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_application_crypto::AppKey;
|
||||
use sp_blockchain::{Error as ClientError, HeaderBackend, HeaderMetadata};
|
||||
@@ -78,7 +79,6 @@ use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::{Block as BlockT, DigestFor, NumberFor, Zero},
|
||||
};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver};
|
||||
|
||||
pub use finality_grandpa::BlockNumberOps;
|
||||
use finality_grandpa::{voter, voter_set::VoterSet, Error as GrandpaError};
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
use parking_lot::Mutex;
|
||||
use std::sync::Arc;
|
||||
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
|
||||
use crate::{justification::GrandpaJustification, Error};
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@ use log::{debug, info, warn};
|
||||
|
||||
use sc_client_api::backend::Backend;
|
||||
use sc_telemetry::TelemetryHandle;
|
||||
use sc_utils::mpsc::TracingUnboundedReceiver;
|
||||
use sp_blockchain::HeaderMetadata;
|
||||
use sp_consensus::SelectChain;
|
||||
use sp_finality_grandpa::AuthorityId;
|
||||
use sp_keystore::SyncCryptoStorePtr;
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use sp_utils::mpsc::TracingUnboundedReceiver;
|
||||
|
||||
use crate::{
|
||||
authorities::SharedAuthoritySet,
|
||||
@@ -403,8 +403,8 @@ mod tests {
|
||||
};
|
||||
use assert_matches::assert_matches;
|
||||
use sc_network::PeerId;
|
||||
use sc_utils::mpsc::tracing_unbounded;
|
||||
use sp_blockchain::HeaderBackend as _;
|
||||
use sp_utils::mpsc::tracing_unbounded;
|
||||
use substrate_test_runtime_client::{TestClientBuilder, TestClientBuilderExt};
|
||||
|
||||
use futures::executor;
|
||||
|
||||
@@ -37,9 +37,9 @@ use log::{debug, warn};
|
||||
use parking_lot::Mutex;
|
||||
use prometheus_endpoint::{register, Gauge, PrometheusError, Registry, U64};
|
||||
use sc_client_api::{BlockImportNotification, ImportNotifications};
|
||||
use sc_utils::mpsc::TracingUnboundedReceiver;
|
||||
use sp_finality_grandpa::AuthorityId;
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use sp_utils::mpsc::TracingUnboundedReceiver;
|
||||
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
@@ -561,8 +561,8 @@ mod tests {
|
||||
use futures::future::Either;
|
||||
use futures_timer::Delay;
|
||||
use sc_client_api::BlockImportNotification;
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedSender};
|
||||
use sp_consensus::BlockOrigin;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedSender};
|
||||
use substrate_test_runtime_client::runtime::{Block, Hash, Header};
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
@@ -55,7 +55,7 @@ sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/comm
|
||||
sc-consensus = { version = "0.10.0-dev", path = "../consensus/common" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
sp-finality-grandpa = { version = "4.0.0-dev", path = "../../primitives/finality-grandpa" }
|
||||
thiserror = "1"
|
||||
unsigned-varint = { version = "0.6.0", features = [
|
||||
|
||||
@@ -27,9 +27,9 @@ use sc_client_api::{
|
||||
RemoteChangesRequest, RemoteHeaderRequest, RemoteReadChildRequest, RemoteReadRequest,
|
||||
StorageProof,
|
||||
};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_blockchain::Error as ClientError;
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
pin::Pin,
|
||||
|
||||
@@ -70,8 +70,8 @@ use metrics::{Histogram, HistogramVec, MetricSources, Metrics};
|
||||
use parking_lot::Mutex;
|
||||
use sc_consensus::{BlockImportError, BlockImportStatus, ImportQueue, Link};
|
||||
use sc_peerset::PeersetHandle;
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{
|
||||
borrow::Cow,
|
||||
cmp,
|
||||
|
||||
@@ -29,7 +29,7 @@ sp-api = { version = "4.0.0-dev", path = "../../primitives/api" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
sp-offchain = { version = "4.0.0-dev", path = "../../primitives/offchain" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
threadpool = "1.7"
|
||||
|
||||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||
|
||||
@@ -34,8 +34,8 @@ use futures::{channel::mpsc, future, prelude::*};
|
||||
use hyper::{client, Body, Client as HyperClient};
|
||||
use hyper_rustls::HttpsConnector;
|
||||
use log::error;
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_core::offchain::{HttpError, HttpRequestId, HttpRequestStatus, Timestamp};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{
|
||||
convert::TryFrom,
|
||||
fmt,
|
||||
|
||||
@@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
futures = "0.3.9"
|
||||
libp2p = { version = "0.39.1", default-features = false }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils"}
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils"}
|
||||
log = "0.4.8"
|
||||
serde_json = "1.0.41"
|
||||
wasm-timer = "0.2"
|
||||
|
||||
@@ -36,8 +36,8 @@ mod peersstate;
|
||||
|
||||
use futures::prelude::*;
|
||||
use log::{debug, error, trace};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use serde_json::json;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{
|
||||
collections::{HashMap, HashSet, VecDeque},
|
||||
pin::Pin,
|
||||
|
||||
@@ -27,7 +27,7 @@ serde_json = "1.0.41"
|
||||
sp-session = { version = "4.0.0-dev", path = "../../primitives/session" }
|
||||
sp-offchain = { version = "4.0.0-dev", path = "../../primitives/offchain" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
sp-rpc = { version = "4.0.0-dev", path = "../../primitives/rpc" }
|
||||
sp-keystore = { version = "0.10.0-dev", path = "../../primitives/keystore" }
|
||||
sc-chain-spec = { version = "4.0.0-dev", path = "../chain-spec" }
|
||||
|
||||
@@ -22,8 +22,8 @@ use self::error::Result;
|
||||
use futures::{channel::oneshot, FutureExt};
|
||||
use sc_rpc_api::{DenyUnsafe, Receiver};
|
||||
use sc_tracing::logging;
|
||||
use sc_utils::mpsc::TracingUnboundedSender;
|
||||
use sp_runtime::traits::{self, Header as HeaderT};
|
||||
use sp_utils::mpsc::TracingUnboundedSender;
|
||||
|
||||
pub use self::{
|
||||
gen_client::Client as SystemClient,
|
||||
|
||||
@@ -21,7 +21,7 @@ use super::*;
|
||||
use assert_matches::assert_matches;
|
||||
use futures::{executor, prelude::*};
|
||||
use sc_network::{self, config::Role, PeerId};
|
||||
use sp_utils::mpsc::tracing_unbounded;
|
||||
use sc_utils::mpsc::tracing_unbounded;
|
||||
use std::{
|
||||
env,
|
||||
io::{BufRead, BufReader, Write},
|
||||
|
||||
@@ -39,7 +39,7 @@ sc-keystore = { version = "4.0.0-dev", path = "../keystore" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../primitives/runtime" }
|
||||
sp-trie = { version = "4.0.0-dev", path = "../../primitives/trie" }
|
||||
sp-externalities = { version = "0.10.0-dev", path = "../../primitives/externalities" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
sp-version = { version = "4.0.0-dev", path = "../../primitives/version" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../primitives/core" }
|
||||
|
||||
@@ -49,6 +49,7 @@ use sc_network::{
|
||||
};
|
||||
use sc_telemetry::{telemetry, ConnectionMessage, Telemetry, TelemetryHandle, SUBSTRATE_INFO};
|
||||
use sc_transaction_pool_api::MaintainedTransactionPool;
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedSender};
|
||||
use sp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use sp_blockchain::{HeaderBackend, HeaderMetadata};
|
||||
use sp_consensus::block_validation::{
|
||||
@@ -61,7 +62,6 @@ use sp_runtime::{
|
||||
traits::{Block as BlockT, BlockIdTo, HashFor, Zero},
|
||||
BuildStorage,
|
||||
};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedSender};
|
||||
use std::{str::FromStr, sync::Arc, time::SystemTime};
|
||||
|
||||
/// A utility trait for building an RPC extension given a `DenyUnsafe` instance.
|
||||
|
||||
@@ -61,6 +61,7 @@ use sp_blockchain::{
|
||||
};
|
||||
use sp_consensus::{BlockOrigin, BlockStatus, Error as ConsensusError};
|
||||
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedSender};
|
||||
use sp_core::{
|
||||
convert_hash,
|
||||
storage::{well_known_keys, ChildInfo, PrefixedStorageKey, StorageData, StorageKey},
|
||||
@@ -82,7 +83,6 @@ use sp_state_machine::{
|
||||
ChangesTrieConfigurationRange, ChangesTrieRootsStorage, ChangesTrieStorage, DBValue,
|
||||
};
|
||||
use sp_trie::StorageProof;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedSender};
|
||||
use std::{
|
||||
collections::{BTreeMap, HashMap, HashSet},
|
||||
marker::PhantomData,
|
||||
|
||||
@@ -41,11 +41,11 @@ use futures::{stream, Future, FutureExt, Stream, StreamExt};
|
||||
use log::{debug, error, warn};
|
||||
use parity_util_mem::MallocSizeOf;
|
||||
use sc_network::PeerId;
|
||||
use sc_utils::mpsc::TracingUnboundedReceiver;
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::{Block as BlockT, Header as HeaderT},
|
||||
};
|
||||
use sp_utils::mpsc::TracingUnboundedReceiver;
|
||||
|
||||
pub use self::{
|
||||
builder::{
|
||||
|
||||
@@ -25,9 +25,9 @@ use sc_client_api::{ClientInfo, UsageProvider};
|
||||
use sc_network::{config::Role, NetworkService, NetworkStatus};
|
||||
use sc_telemetry::{telemetry, TelemetryHandle, SUBSTRATE_INFO};
|
||||
use sc_transaction_pool_api::{MaintainedTransactionPool, PoolStatus};
|
||||
use sc_utils::metrics::register_globals;
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_runtime::traits::{Block, NumberFor, SaturatedConversion, UniqueSaturatedInto};
|
||||
use sp_utils::metrics::register_globals;
|
||||
use std::{
|
||||
sync::Arc,
|
||||
time::{Duration, Instant},
|
||||
|
||||
@@ -33,7 +33,7 @@ use prometheus_endpoint::{
|
||||
exponential_buckets, register, CounterVec, HistogramOpts, HistogramVec, Opts, PrometheusError,
|
||||
Registry, U64,
|
||||
};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use std::{panic, pin::Pin, result::Result};
|
||||
use tracing_futures::Instrument;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ sp-tracing = { version = "4.0.0-dev", path = "../../primitives/tracing" }
|
||||
sp-transaction-pool = { version = "4.0.0-dev", path = "../../primitives/transaction-pool" }
|
||||
sc-transaction-pool-api = { version = "4.0.0-dev", path = "./api" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../utils" }
|
||||
serde = { version = "1.0.126", features = ["derive"] }
|
||||
linked-hash-map = "0.5.4"
|
||||
retain_mut = "0.1.3"
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2018-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Transaction pool errors.
|
||||
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2019-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Transaction pool client facing API.
|
||||
#![warn(missing_docs)]
|
||||
|
||||
@@ -20,7 +20,7 @@ log = "0.4.8"
|
||||
parking_lot = "0.11.1"
|
||||
serde = { version = "1.0.101", features = ["derive"] }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
|
||||
sp-utils = { version = "4.0.0-dev", path = "../../../primitives/utils" }
|
||||
sc-utils = { version = "4.0.0-dev", path = "../../utils" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
sp-runtime = { version = "4.0.0-dev", path = "../../../primitives/runtime" }
|
||||
sp-transaction-pool = { version = "4.0.0-dev", path = "../../../primitives/transaction-pool" }
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
use futures::Stream;
|
||||
use sc_transaction_pool_api::TransactionStatus;
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
|
||||
/// Extrinsic watcher.
|
||||
///
|
||||
|
||||
@@ -25,12 +25,12 @@ use std::{
|
||||
};
|
||||
|
||||
use crate::graph::{ChainApi, ExtrinsicHash, NumberFor, Pool, ValidatedTransaction};
|
||||
use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::{SaturatedConversion, Zero},
|
||||
transaction_validity::TransactionValidityError,
|
||||
};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
|
||||
use futures::prelude::*;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "sp-utils"
|
||||
name = "sc-utils"
|
||||
version = "4.0.0-dev"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2020-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Utilities Primitives for Substrate
|
||||
//!
|
||||
@@ -1,19 +1,21 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2020-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! Metering primitives and globals
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2020-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Features to meter unbounded channels
|
||||
|
||||
+13
-12
@@ -1,19 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 2019-2021 Parity Technologies (UK) Ltd.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
|
||||
use futures::{lock::Mutex, prelude::*};
|
||||
Reference in New Issue
Block a user