forked from cerc-io/plugeth
61270e5e1c
This PR reduces the bandwidth used by the light client to compute the recommended gas price. The current mechanism for suggesting the price is: - retrieve recent 20 blocks - get the lowest gas price of these blocks - sort the price array and return the middle(60%) one This works for full nodes, which have all blocks available locally. However, this is very expensive for the light client because the light client needs to retrieve block bodies from the network. The PR changes the default options for light client. With the new config, the light client only retrieves the two latest blocks, but in order to collect more sample transactions, the 3 lowest prices are collected from each block. This PR also changes the behavior for empty blocks. If the block is empty, the lastest price is reused for sampling. |
||
---|---|---|
.. | ||
downloader | ||
fetcher | ||
filters | ||
gasprice | ||
tracers | ||
api_backend.go | ||
api_test.go | ||
api_tracer.go | ||
api.go | ||
backend.go | ||
bloombits.go | ||
config.go | ||
discovery.go | ||
gen_config.go | ||
handler_test.go | ||
handler.go | ||
helper_test.go | ||
peer.go | ||
protocol_test.go | ||
protocol.go | ||
sync_test.go | ||
sync.go |