diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-02-22 13:14:55 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:57 +0800 |
commit | 11e2de8c43f867764d4dd1146d467cb6e9bf114b (patch) | |
tree | fb821d64098f7c62dabf879f9edfc4490b033a58 /core/blockchain_test.go | |
parent | af12f1f869609d2f3acf27c9315b6bbe816d9761 (diff) | |
download | dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.tar.gz dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.tar.zst dexon-11e2de8c43f867764d4dd1146d467cb6e9bf114b.zip |
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
Diffstat (limited to 'core/blockchain_test.go')
-rw-r--r-- | core/blockchain_test.go | 7 |
1 files changed, 2 insertions, 5 deletions
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 { |