Skip to content

Fix compile errors: add libp2p dep, re-export PeerSnapshot, remove unused miner variable - #19

Open
dill-lk wants to merge 5 commits into
mainfrom
codex/fix-compile-errors-in-node-module
Open

Fix compile errors: add libp2p dep, re-export PeerSnapshot, remove unused miner variable#19
dill-lk wants to merge 5 commits into
mainfrom
codex/fix-compile-errors-in-node-module

Conversation

@dill-lk

@dill-lk dill-lk commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Resolve unresolved crate and type errors preventing the lattice binary from compiling by making required symbols available to bins/lattice at build time.
  • Make PeerSnapshot available from the lattice-rpc crate root so downstream consumers can import it as lattice_rpc::PeerSnapshot.
  • Remove an unused local binding in the miner that triggered -D warnings and failed the build.

Description

  • Add the workspace libp2p dependency to the lattice binary by updating bins/lattice/Cargo.toml so use libp2p::... imports resolve.
  • Re-export PeerSnapshot from crates/lattice-rpc/src/lib.rs by changing pub use handlers::{ChainState, RpcHandlers}; to pub use handlers::{ChainState, PeerSnapshot, RpcHandlers}; so PeerSnapshot is available at the crate root.
  • Remove the unused current_height binding in bins/lattice/src/miner/mod.rs to eliminate the unused variable compile error under -D warnings.

Testing

  • Ran cargo check -p lattice which progressed past the originally reported Rust symbol and unused-variable errors but continued into long-running native dependency compilation (RocksDB and other crates) and was stopped by the environment before completing.
  • Ran cargo check -p lattice-rpc which also compiled past the earlier export error and reached heavy native compilation and was stopped for the same environment limitation.

Codex Task

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the libp2p dependency to the lattice binary, removes an unused current_height variable from the miner implementation, and exports PeerSnapshot from the lattice-rpc crate. I have no feedback to provide as there are no review comments or issues identified.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant