diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-02-25 18:27:34 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:22 +0800 |
commit | 8e92e73dc650ac03c228fbb26a3afe88a5bc237c (patch) | |
tree | 0d0c74884bddd2c29e38dfb903ccfd1459c8f279 /params/gen_dexcon_config.go | |
parent | f1a3f3a8f39d5490f4320591def9c2866d866bc4 (diff) | |
download | go-tangerine-8e92e73dc650ac03c228fbb26a3afe88a5bc237c.tar go-tangerine-8e92e73dc650ac03c228fbb26a3afe88a5bc237c.tar.gz go-tangerine-8e92e73dc650ac03c228fbb26a3afe88a5bc237c.tar.bz2 go-tangerine-8e92e73dc650ac03c228fbb26a3afe88a5bc237c.tar.lz go-tangerine-8e92e73dc650ac03c228fbb26a3afe88a5bc237c.tar.xz go-tangerine-8e92e73dc650ac03c228fbb26a3afe88a5bc237c.tar.zst go-tangerine-8e92e73dc650ac03c228fbb26a3afe88a5bc237c.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 'params/gen_dexcon_config.go')
-rw-r--r-- | params/gen_dexcon_config.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/params/gen_dexcon_config.go b/params/gen_dexcon_config.go index 566ed9fcd..1afe11f56 100644 --- a/params/gen_dexcon_config.go +++ b/params/gen_dexcon_config.go @@ -30,6 +30,7 @@ func (d DexconConfig) MarshalJSON() ([]byte, error) { RoundLength uint64 `json:"roundLength"` MinBlockInterval uint64 `json:"minBlockInterval"` FineValues []*math.HexOrDecimal256 `json:"fineValues"` + MinGasPrice *math.HexOrDecimal256 `json:"minGasPrice"` } var enc DexconConfig enc.GenesisCRSText = d.GenesisCRSText @@ -52,6 +53,7 @@ func (d DexconConfig) MarshalJSON() ([]byte, error) { enc.FineValues[k] = (*math.HexOrDecimal256)(v) } } + enc.MinGasPrice = (*math.HexOrDecimal256)(d.MinGasPrice) return json.Marshal(&enc) } @@ -73,6 +75,7 @@ func (d *DexconConfig) UnmarshalJSON(input []byte) error { RoundLength *uint64 `json:"roundLength"` MinBlockInterval *uint64 `json:"minBlockInterval"` FineValues []*math.HexOrDecimal256 `json:"fineValues"` + MinGasPrice *math.HexOrDecimal256 `json:"minGasPrice"` } var dec DexconConfig if err := json.Unmarshal(input, &dec); err != nil { @@ -126,5 +129,8 @@ func (d *DexconConfig) UnmarshalJSON(input []byte) error { d.FineValues[k] = (*big.Int)(v) } } + if dec.MinGasPrice != nil { + d.MinGasPrice = (*big.Int)(dec.MinGasPrice) + } return nil } |