-
Notifications
You must be signed in to change notification settings - Fork 2k
chore: remove unused code #10718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
chore: remove unused code #10718
Conversation
/// Sets the reported block number | ||
/// | ||
/// Handler for ETH RPC call: `anvil_setBlock` | ||
pub fn anvil_set_block(&self, block_number: u64) -> Result<()> { | ||
node_info!("anvil_setBlock"); | ||
self.backend.set_block_number(block_number); | ||
Ok(()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be implemented instead of removed
/// Returns protocol version encoded as a string (quotes are necessary). | ||
/// | ||
/// Handler for ETH RPC call: `eth_protocolVersion` | ||
pub fn protocol_version(&self) -> Result<u64> { | ||
node_info!("eth_protocolVersion"); | ||
Ok(1) | ||
} | ||
|
||
/// Returns the number of hashes per second that the node is mining with. | ||
/// | ||
/// Handler for ETH RPC call: `eth_hashrate` | ||
pub fn hashrate(&self) -> Result<U256> { | ||
node_info!("eth_hashrate"); | ||
Ok(U256::ZERO) | ||
} | ||
|
||
/// Returns the client coinbase address. | ||
/// | ||
/// Handler for ETH RPC call: `eth_coinbase` | ||
pub fn author(&self) -> Result<Address> { | ||
node_info!("eth_coinbase"); | ||
Ok(self.backend.coinbase()) | ||
} | ||
|
||
/// Returns true if client is actively mining new blocks. | ||
/// | ||
/// Handler for ETH RPC call: `eth_mining` | ||
pub fn is_mining(&self) -> Result<bool> { | ||
node_info!("eth_mining"); | ||
Ok(self.is_mining) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should likely be implemented, they are currently not
// Helper function to set default chains | ||
fn create_default_chains() -> HashMap<String, ChainData> { | ||
let mut chains = HashMap::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is entirely unused / not wired up, I think these are leftover files from #10226
Motivation
Opening for visibility + discussion
Solution
Methodology: https://gist.github.com/zerosnacks/227ac62697fba3c868db4156d4e37610
Removes unused code
PR Checklist