diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-03-28 18:21:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-15 22:09:55 +0800 |
commit | 4efc1cf485200000420bd79638139eb5383641ae (patch) | |
tree | ae0069fd1b9ec056f1f4a39e4553bdd1f3c32c0f /core | |
parent | d2bfae48e7f490e803bf09579c021c7720159fc1 (diff) | |
download | go-tangerine-4efc1cf485200000420bd79638139eb5383641ae.tar.gz go-tangerine-4efc1cf485200000420bd79638139eb5383641ae.tar.zst go-tangerine-4efc1cf485200000420bd79638139eb5383641ae.zip |
dex: rebuild connection if dkg reset, core/vm: fix gov (#308)
* dex: rebuild connection if dkg reset
* core: vm: fix governance contract
Diffstat (limited to 'core')
-rw-r--r-- | core/governance.go | 4 | ||||
-rw-r--r-- | core/vm/oracle_contracts.go | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/core/governance.go b/core/governance.go index 28f0a41fe..b7dbba722 100644 --- a/core/governance.go +++ b/core/governance.go @@ -170,6 +170,10 @@ func (d *Governance) NodeSet(round uint64) []coreCrypto.PublicKey { return pks } +func (d *Governance) PurgeNotarySet(round uint64) { + d.nodeSetCache.Purge(round) +} + func (d *Governance) NotarySet(round uint64) (map[string]struct{}, error) { notarySet, err := d.nodeSetCache.GetNotarySet(round) if err != nil { diff --git a/core/vm/oracle_contracts.go b/core/vm/oracle_contracts.go index 843b23d18..55bf38b2b 100644 --- a/core/vm/oracle_contracts.go +++ b/core/vm/oracle_contracts.go @@ -2347,6 +2347,18 @@ func (g *GovernanceContract) Run(evm *EVM, input []byte, contract *Contract) (re return nil, errExecutionReverted } return res, nil + case "notaryParamAlpha": + res, err := method.Outputs.Pack(g.state.NotaryParamAlpha()) + if err != nil { + return nil, errExecutionReverted + } + return res, nil + case "notaryParamBeta": + res, err := method.Outputs.Pack(g.state.NotaryParamBeta()) + if err != nil { + return nil, errExecutionReverted + } + return res, nil case "owner": res, err := method.Outputs.Pack(g.state.Owner()) if err != nil { |