diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-03-20 18:45:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:58 +0800 |
commit | f247ebfcdb76160006f0124ff881e1e2a36e547e (patch) | |
tree | 706fa4ec53fa78ba80d06cb5de7b9b07b6bdb509 /core | |
parent | 76de745eba01666d4407ded2e26d3c453996a8c3 (diff) | |
download | go-tangerine-f247ebfcdb76160006f0124ff881e1e2a36e547e.tar go-tangerine-f247ebfcdb76160006f0124ff881e1e2a36e547e.tar.gz go-tangerine-f247ebfcdb76160006f0124ff881e1e2a36e547e.tar.bz2 go-tangerine-f247ebfcdb76160006f0124ff881e1e2a36e547e.tar.lz go-tangerine-f247ebfcdb76160006f0124ff881e1e2a36e547e.tar.xz go-tangerine-f247ebfcdb76160006f0124ff881e1e2a36e547e.tar.zst go-tangerine-f247ebfcdb76160006f0124ff881e1e2a36e547e.zip |
core: vm: pay fine to governance owner and trigger set size recalculation (#288)
Diffstat (limited to 'core')
-rw-r--r-- | core/vm/oracle_contracts.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/vm/oracle_contracts.go b/core/vm/oracle_contracts.go index cd11dc051..b9525e00b 100644 --- a/core/vm/oracle_contracts.go +++ b/core/vm/oracle_contracts.go @@ -1768,10 +1768,14 @@ func (g *GovernanceContract) payFine(nodeAddr common.Address) ([]byte, error) { node.Fined = new(big.Int).Sub(node.Fined, g.contract.Value()) g.state.UpdateNode(nodeOffset, node) - // TODO: paid fine should be added to award pool. + // Pay the fine to governance owner. + g.evm.StateDB.AddBalance(g.state.Owner(), g.contract.Value()) g.state.emitFinePaid(nodeAddr, g.contract.Value()) + g.state.CalNotarySetSize() + g.state.CalDKGSetSize() + return g.useGas(GovernanceActionGasCost) } |