Skip to content

Conversation

@felipemadero
Copy link
Collaborator

Why this should be merged

The avalanche blockchain import file command was removed in #2969 as part of the APM cleanup. However, the file-based import functionality is still useful and doesn't depend on APM, and is the inverse of export command. This PR restores the command without the APM/repository dependencies, allowing users to import blockchain configurations from JSON export files.

How this works

This PR restores three files:

  • cmd/blockchaincmd/import_file.go - Implements the avalanche blockchain import file command

  • cmd/blockchaincmd/export_test.go - Tests for export/import functionality

  • Updates cmd/blockchaincmd/import.go - Registers the command

    How this was tested

  • Unit test TestExportImportSubnet passes

Restores the avalanche blockchain import file command that was removed
in the APM cleanup. This command allows users to import blockchain
configurations from JSON export files.
@felipemadero felipemadero merged commit d7c029a into main Nov 21, 2025
62 checks passed
@felipemadero felipemadero deleted the restore-import-file-command branch November 21, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants