Market-orientated transaction pricing (#1963)

* Market-orientated transaction pricing

Avoid a strict gas-limit and let the market decide through using
a priority queue based around gas pricing for transactions. In
periods of low transaction volume, they'll be processed for a lower
fee.

* Fix tests, add/clarify documentation, fix some logic.

* Change default to reflect CLI.

* Specify type.

* Make test more precise.

* Fix doc test
This commit is contained in:
Gav Wood
2016-08-23 13:30:33 +02:00
committed by GitHub
parent f4826d1b2a
commit 35ecb396b6
3 changed files with 295 additions and 175 deletions

View File

@@ -170,7 +170,7 @@ Sealing/Mining Options:
lenient - Same as strict when mining, and cheap
when not [default: cheap].
--usd-per-tx USD Amount of USD to be paid for a basic transaction
[default: 0.005]. The minimum gas price is set
[default: 0]. The minimum gas price is set
accordingly.
--usd-per-eth SOURCE USD value of a single ETH. SOURCE may be either an
amount in USD, a web service or 'auto' to use each

View File

@@ -179,7 +179,7 @@ pub enum GasPricerConfig {
impl Default for GasPricerConfig {
fn default() -> Self {
GasPricerConfig::Calibrated {
usd_per_tx: 0.005,
usd_per_tx: 0f32,
recalibration_period: Duration::from_secs(3600),
}
}