aboutsummaryrefslogtreecommitdiffstats
path: root/dex/api_backend.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-02-25 18:27:34 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commitd779f5aead9e91b97c8d05136ddb7a6bd84f4276 (patch)
treea0f497e1109cc1ad89183f97aee193938bf5306e /dex/api_backend.go
parentd5e4399839e04f5d85dd3a06fb14d6ad117a79f3 (diff)
downloaddexon-d779f5aead9e91b97c8d05136ddb7a6bd84f4276.tar.gz
dexon-d779f5aead9e91b97c8d05136ddb7a6bd84f4276.tar.zst
dexon-d779f5aead9e91b97c8d05136ddb7a6bd84f4276.zip
core: Fixed gas price (#205)
* core/vm: update abi * core/vm: add MinGasPrice to gov * params: Add MinGasPrice to Config * dex: SuggestPrice from Governance * test: add minGasPrice to genesis.json * core: check underpriced tx * dex: verify with gas price
Diffstat (limited to 'dex/api_backend.go')
-rw-r--r--dex/api_backend.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/dex/api_backend.go b/dex/api_backend.go
index 719625946..d423b41f7 100644
--- a/dex/api_backend.go
+++ b/dex/api_backend.go
@@ -195,7 +195,7 @@ func (b *DexAPIBackend) ProtocolVersion() int {
}
func (b *DexAPIBackend) SuggestPrice(ctx context.Context) (*big.Int, error) {
- return b.gpo.SuggestPrice(ctx)
+ return b.dex.governance.MinGasPrice(b.dex.blockchain.CurrentBlock().Round()), nil
}
func (b *DexAPIBackend) ChainDb() ethdb.Database {