mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-07 03:22:18 +00:00
bb6dfef7c8
* Remove interfaces for replacement * Squashed 'interfaces/' content from commit be07fc9 git-subtree-dir: interfaces git-subtree-split: be07fc99183a7cef1ca08961033bdb917d85d9b5 * save * Remove interfaces for replacement * Squashed 'interfaces/' content from commit be07fc9 git-subtree-dir: interfaces git-subtree-split: be07fc99183a7cef1ca08961033bdb917d85d9b5 * Remove interfaces for replacement * Squashed 'interfaces/' content from commit 23d68fd git-subtree-dir: interfaces git-subtree-split: 23d68fda86c3a2c322e7b430c817b06b6f6ca311 * Remove interfaces for replacement * Squashed 'interfaces/' content from commit 500dde8 git-subtree-dir: interfaces git-subtree-split: 500dde8293c0a12d19d94b5ff633722a03d7fc4e * save * Remove interfaces for replacement * Squashed 'interfaces/' content from commit e5b1945 git-subtree-dir: interfaces git-subtree-split: e5b1945d02da7a7f00e2289034ee90a6edd60184 * save * Remove interfaces for replacement * Squashed 'interfaces/' content from commit f36d878 git-subtree-dir: interfaces git-subtree-split: f36d878080fe018a41fb903f81fc8f8ac9981cbd * save * save * save
49 lines
1.2 KiB
Rust
49 lines
1.2 KiB
Rust
fn config() -> prost_build::Config {
|
|
let mut config = prost_build::Config::new();
|
|
config.protoc_arg("--experimental_allow_proto3_optional");
|
|
config.bytes(&["."]);
|
|
config
|
|
}
|
|
|
|
fn make_protos(protos: &[&str]) {
|
|
tonic_build::configure()
|
|
.format(false)
|
|
.compile_with_config(config(), protos, &["."])
|
|
.unwrap();
|
|
}
|
|
|
|
fn main() {
|
|
let mut protos = vec!["types/types.proto"];
|
|
|
|
if cfg!(feature = "consensus") {
|
|
protos.push("consensus_engine/consensus.proto");
|
|
}
|
|
|
|
if cfg!(feature = "sentry") {
|
|
protos.push("p2psentry/sentry.proto");
|
|
}
|
|
|
|
if cfg!(feature = "remotekv") {
|
|
protos.push("remote/ethbackend.proto");
|
|
protos.push("remote/kv.proto");
|
|
}
|
|
|
|
if cfg!(feature = "snapshotsync") {
|
|
protos.push("downloader/downloader.proto");
|
|
}
|
|
|
|
if cfg!(feature = "txpool") {
|
|
protos.push("txpool/mining.proto");
|
|
protos.push("txpool/txpool.proto");
|
|
protos.push("txpool/txpool_control.proto");
|
|
}
|
|
|
|
if cfg!(feature = "web3") {
|
|
protos.push("web3/common.proto");
|
|
protos.push("web3/eth.proto");
|
|
protos.push("web3/trace.proto");
|
|
}
|
|
|
|
make_protos(&protos);
|
|
}
|