From 11e2de8c43f867764d4dd1146d467cb6e9bf114b Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Fri, 22 Feb 2019 13:14:55 +0800 Subject: core: Remove K, Phi and NumChains from Governance (#198) * change default sync_core.sh * vendor: sync to latest core * core: Remove K, Phi and NumChain --- core/blockchain_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'core/blockchain_test.go') diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 1f5197002..f972eb0b2 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -1611,17 +1611,15 @@ type dexconTest struct { dexcon.Dexcon blockReward *big.Int - numChains uint32 } // Finalize for skip governance access. func (d *dexconTest) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error) { - reward := new(big.Int).Div(d.blockReward, big.NewInt(int64(d.numChains))) - state.AddBalance(header.Coinbase, reward) + state.AddBalance(header.Coinbase, d.blockReward) - header.Reward = reward + header.Reward = d.blockReward header.Root = state.IntermediateRoot(true) return types.NewBlock(header, txs, uncles, receipts), nil } @@ -1651,7 +1649,6 @@ func TestProcessBlock(t *testing.T) { engine := &dexconTest{ blockReward: big.NewInt(1e18), - numChains: chainConfig.Dexcon.NumChains, } chain, err := NewBlockChain(db, nil, chainConfig, engine, vm.Config{}, nil) if err != nil { -- cgit v1.2.3