reth_node_core::primitives

Function format_gas

pub fn format_gas(gas: u64) -> String
Expand description

Returns a formatted gas log, showing either:

  • “Kgas”, or 1,000 gas
  • “Mgas”, or 1,000,000 gas
  • “Ggas”, or 1,000,000,000 gas

Depending on the magnitude of gas.