diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-03-20 18:45:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-13 18:11:44 +0800 |
commit | da2926ef1626550865400d033e3219fe0a3781e4 (patch) | |
tree | 927536eda44fe1faf8ecadc1f69968368a5c5eed | |
parent | a14310f78ee8287347d6b103bd1eddd166eba2ce (diff) | |
download | go-tangerine-da2926ef1626550865400d033e3219fe0a3781e4.tar go-tangerine-da2926ef1626550865400d033e3219fe0a3781e4.tar.gz go-tangerine-da2926ef1626550865400d033e3219fe0a3781e4.tar.bz2 go-tangerine-da2926ef1626550865400d033e3219fe0a3781e4.tar.lz go-tangerine-da2926ef1626550865400d033e3219fe0a3781e4.tar.xz go-tangerine-da2926ef1626550865400d033e3219fe0a3781e4.tar.zst go-tangerine-da2926ef1626550865400d033e3219fe0a3781e4.zip |
core: vm: pay fine to governance owner and trigger set size recalculation (#288)
-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 ac6d7315c..e6fe81aa4 100644 --- a/core/vm/oracle_contracts.go +++ b/core/vm/oracle_contracts.go @@ -1764,10 +1764,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) } |