I'm running geth with the following option:
--gasprice 21000
But if I execute the following command:
> eth.gasPrice
It gives me 20000000000
.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI'm running geth with the following option:
--gasprice 21000
But if I execute the following command:
> eth.gasPrice
It gives me 20000000000
.
The --gasprice
flag sets the minimum price per gas that your miner will accept when mining transactions.
The eth.gasPrice
command gives the current gas price, which is based off the moving averages of the gas prices sent in the last few blocks. This is not the same as the --gasprice
flag.
Also, you may be confusing gas and gas price. Every simple transaction takes 21000 gas, regardless of the gas price. Setting the gas price may not be doing what you think it is.
eth.gasPrice
though, you can set gas manually with each transaction
– Tjaden Hess♦
May 17 '16 at 22:08