Skip to content

Commit 0b3a92a

Browse files
committed
chore: remove import-headers command
Replaced with fetch-chain-headers Signed-off-by: Pascal Grange <pascal@grange.nom.fr>
1 parent 834e61e commit 0b3a92a

4 files changed

Lines changed: 1 addition & 224 deletions

File tree

Makefile

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LEDGER_DIR ?= ./ledger.$(NETWORK).db
1515
CHAIN_DIR ?= ./chain.$(NETWORK).db
1616
BUILD_PROFILE ?= release
1717

18-
.PHONY: help bootstrap start import-ledger-state import-headers import-nonces download-haskell-config coverage-html coverage-lconv check-llvm-cov fetch-chain-headers
18+
.PHONY: help bootstrap start import-ledger-state import-nonces download-haskell-config coverage-html coverage-lconv check-llvm-cov fetch-chain-headers
1919

2020
help:
2121
@echo "\033[1;4mTargets:\033[00m"
@@ -47,18 +47,6 @@ import-ledger-state: snapshots/$(NETWORK) ## Import snapshots for demo
4747
--ledger-dir "$(LEDGER_DIR)" \
4848
$$SNAPSHOT_ARGS
4949

50-
import-headers: ## Import headers from $PEER_ADDRESS for demo
51-
@if [ ! -f "$(HEADERS_FILE)" ]; then echo "HEADERS_FILE not found: $(HEADERS_FILE)"; exit 1; fi; \
52-
HEADERS=$$(jq -r '.[]' $(HEADERS_FILE)); \
53-
for HEADER in $$HEADERS; do \
54-
cargo run --profile $(BUILD_PROFILE) -- import-headers \
55-
--network $(NETWORK) \
56-
--chain-dir $(CHAIN_DIR) \
57-
--peer-address $(PEER_ADDRESS) \
58-
--starting-point $$HEADER \
59-
--count 2; \
60-
done
61-
6250
import-nonces: ## Import nonces for demo
6351
@if [ ! -f "$(NONCES_FILE)" ]; then echo "NONCES_FILE not found: $(NONCES_FILE)"; exit 1; fi; \
6452
cargo run --profile $(BUILD_PROFILE) -- import-nonces \

crates/amaru/src/bin/amaru/cmd/import_headers.rs

Lines changed: 0 additions & 205 deletions
This file was deleted.

crates/amaru/src/bin/amaru/cmd/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use pallas_network::facades::PeerClient;
1818
pub(crate) mod bootstrap;
1919
pub(crate) mod daemon;
2020
pub(crate) mod fetch_chain_headers;
21-
pub(crate) mod import_headers;
2221
pub(crate) mod import_ledger_state;
2322
pub(crate) mod import_nonces;
2423

crates/amaru/src/bin/amaru/main.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ enum Command {
4646
#[clap(alias = "import")]
4747
ImportLedgerState(cmd::import_ledger_state::Args),
4848

49-
/// Import block headers from another (live) node.
50-
#[clap(alias = "import-chain-db")]
51-
ImportHeaders(cmd::import_headers::Args),
52-
5349
/// Import VRF nonces intermediate states
5450
ImportNonces(cmd::import_nonces::Args),
5551
}
@@ -113,7 +109,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
113109
let result = match args.command {
114110
Command::Daemon(args) => cmd::daemon::run(args, metrics).await,
115111
Command::ImportLedgerState(args) => cmd::import_ledger_state::run(args).await,
116-
Command::ImportHeaders(args) => cmd::import_headers::run(args).await,
117112
Command::ImportNonces(args) => cmd::import_nonces::run(args).await,
118113
Command::Bootstrap(args) => cmd::bootstrap::run(args).await,
119114
Command::FetchChainHeaders(args) => cmd::fetch_chain_headers::run(args).await,

0 commit comments

Comments
 (0)