mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: move network-txpool.rs example to its own folder (#7892)
Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
This commit is contained in:
committed by
GitHub
parent
16ae640615
commit
062b3d76b9
11
Cargo.lock
generated
11
Cargo.lock
generated
@ -4864,6 +4864,17 @@ dependencies = [
|
|||||||
"unsigned-varint 0.7.2",
|
"unsigned-varint 0.7.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "network-txpool"
|
||||||
|
version = "0.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"eyre",
|
||||||
|
"reth-network",
|
||||||
|
"reth-provider",
|
||||||
|
"reth-transaction-pool",
|
||||||
|
"tokio",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nibble_vec"
|
name = "nibble_vec"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|||||||
@ -80,6 +80,7 @@ members = [
|
|||||||
"examples/custom-dev-node/",
|
"examples/custom-dev-node/",
|
||||||
"examples/custom-payload-builder/",
|
"examples/custom-payload-builder/",
|
||||||
"examples/manual-p2p/",
|
"examples/manual-p2p/",
|
||||||
|
"examples/network-txpool/",
|
||||||
"examples/rpc-db/",
|
"examples/rpc-db/",
|
||||||
"examples/txpool-tracing/",
|
"examples/txpool-tracing/",
|
||||||
"examples/polygon-p2p/",
|
"examples/polygon-p2p/",
|
||||||
|
|||||||
@ -31,9 +31,4 @@ path = "db-access.rs"
|
|||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "network"
|
name = "network"
|
||||||
path = "network.rs"
|
path = "network.rs"
|
||||||
|
|
||||||
[[example]]
|
|
||||||
name = "network-txpool"
|
|
||||||
path = "network-txpool.rs"
|
|
||||||
|
|
||||||
@ -48,10 +48,10 @@ to make a PR!
|
|||||||
|
|
||||||
## Mempool
|
## Mempool
|
||||||
|
|
||||||
| Example | Description |
|
| Example | Description |
|
||||||
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|------------------------------------------------------| -------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| [Trace pending transactions](./txpool-tracing) | Illustrates how to trace pending transactions as they arrive in the mempool |
|
| [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
|
## P2P
|
||||||
|
|
||||||
|
|||||||
13
examples/network-txpool/Cargo.toml
Normal file
13
examples/network-txpool/Cargo.toml
Normal 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
|
||||||
@ -4,7 +4,7 @@
|
|||||||
//! Run with
|
//! Run with
|
||||||
//!
|
//!
|
||||||
//! ```not_rust
|
//! ```not_rust
|
||||||
//! cargo run --example network-txpool
|
//! cargo run --release -p network-txpool -- node
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
use reth_network::{config::rng_secret_key, NetworkConfig, NetworkManager};
|
use reth_network::{config::rng_secret_key, NetworkConfig, NetworkManager};
|
||||||
Reference in New Issue
Block a user