refactor: move network-txpool.rs example to its own folder (#7892)

Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
This commit is contained in:
Andrzej Sulkowski
2024-04-25 20:36:09 +02:00
committed by GitHub
parent 16ae640615
commit 062b3d76b9
6 changed files with 30 additions and 10 deletions

11
Cargo.lock generated
View File

@ -4864,6 +4864,17 @@ dependencies = [
"unsigned-varint 0.7.2",
]
[[package]]
name = "network-txpool"
version = "0.0.0"
dependencies = [
"eyre",
"reth-network",
"reth-provider",
"reth-transaction-pool",
"tokio",
]
[[package]]
name = "nibble_vec"
version = "0.1.0"

View File

@ -80,6 +80,7 @@ members = [
"examples/custom-dev-node/",
"examples/custom-payload-builder/",
"examples/manual-p2p/",
"examples/network-txpool/",
"examples/rpc-db/",
"examples/txpool-tracing/",
"examples/polygon-p2p/",

View File

@ -31,9 +31,4 @@ path = "db-access.rs"
[[example]]
name = "network"
path = "network.rs"
[[example]]
name = "network-txpool"
path = "network-txpool.rs"
path = "network.rs"

View File

@ -48,10 +48,10 @@ to make a PR!
## Mempool
| Example | Description |
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Example | Description |
|------------------------------------------------------| -------------------------------------------------------------------------------------------------------------------------- |
| [Trace pending transactions](./txpool-tracing) | Illustrates how to trace pending transactions as they arrive in the mempool |
| [Standalone txpool](./network-txpool.rs) | Illustrates how to use the network as a standalone component together with a transaction pool with a custom pool validator |
| [Standalone txpool](./network-txpool) | Illustrates how to use the network as a standalone component together with a transaction pool with a custom pool validator |
## P2P

View File

@ -0,0 +1,13 @@
[package]
name = "network-txpool"
version = "0.0.0"
publish = false
edition.workspace = true
license.workspace = true
[dependencies]
reth-provider = { workspace = true, features = ["test-utils"] }
eyre.workspace = true
tokio.workspace = true
reth-network.workspace = true
reth-transaction-pool.workspace = true

View File

@ -4,7 +4,7 @@
//! Run with
//!
//! ```not_rust
//! cargo run --example network-txpool
//! cargo run --release -p network-txpool -- node
//! ```
use reth_network::{config::rng_secret_key, NetworkConfig, NetworkManager};