I'm running geth with the following option:
--gasprice 21000
But if I execute the following command:
> eth.gasPrice
It gives me 20000000000
.
gas-price
I'm running geth with the following option:
--gasprice 21000
But if I execute the following command:
> eth.gasPrice
It gives me 20000000000
.
Best Answer
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.