aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain_test.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-02-22 13:14:55 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:22 +0800
commit2354d4aa747616a8fd4fb9482ada8042fd362139 (patch)
tree46fe0953c0258591c2cd415c3760764ff613a5bb /core/blockchain_test.go
parent81193a683d6328b627ee0e5f0f3689b3473e29ea (diff)
downloadgo-tangerine-2354d4aa747616a8fd4fb9482ada8042fd362139.tar.gz
go-tangerine-2354d4aa747616a8fd4fb9482ada8042fd362139.tar.zst
go-tangerine-2354d4aa747616a8fd4fb9482ada8042fd362139.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.go7
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 {