aboutsummaryrefslogtreecommitdiffstats
path: root/core/governance.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-04-09 21:32:57 +0800
commit5832a21db625bfa98a3b7909bb6996dd1fd2e4d3 (patch)
tree73f5de74fa6aa753349f00e11e989533de8a45ef /core/governance.go
parent6e66efc9f69d59a011215f88a0de03508d9c56ab (diff)
downloaddexon-5832a21db625bfa98a3b7909bb6996dd1fd2e4d3.tar
dexon-5832a21db625bfa98a3b7909bb6996dd1fd2e4d3.tar.gz
dexon-5832a21db625bfa98a3b7909bb6996dd1fd2e4d3.tar.bz2
dexon-5832a21db625bfa98a3b7909bb6996dd1fd2e4d3.tar.lz
dexon-5832a21db625bfa98a3b7909bb6996dd1fd2e4d3.tar.xz
dexon-5832a21db625bfa98a3b7909bb6996dd1fd2e4d3.tar.zst
dexon-5832a21db625bfa98a3b7909bb6996dd1fd2e4d3.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 'core/governance.go')
-rw-r--r--core/governance.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/governance.go b/core/governance.go
index 12124760e..9929867c9 100644
--- a/core/governance.go
+++ b/core/governance.go
@@ -134,3 +134,7 @@ func (g *Governance) IsDKGFinal(round uint64) bool {
count := headHelper.DKGFinalizedsCount(big.NewInt(int64(round))).Uint64()
return count >= threshold
}
+
+func (g *Governance) MinGasPrice(round uint64) *big.Int {
+ return g.GetGovStateHelperAtRound(round).MinGasPrice()
+}