From 16009f940c3b4a7b5e860bf8303c8abed2b479e7 Mon Sep 17 00:00:00 2001 From: Tuna Date: Thu, 5 Apr 2018 17:57:08 +0700 Subject: [PATCH] temporary set block reward --- consensus/clique/clique.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index 2bdad9092a..63812845a7 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -570,6 +570,11 @@ func (c *Clique) Prepare(chain consensus.ChainReader, header *types.Header) erro // Finalize implements consensus.Engine, ensuring no uncles are set, nor block // rewards given, and returns the final block. func (c *Clique) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error) { + // set block reward + blockReward := big.NewInt(5e+18) + reward := new(big.Int).Set(blockReward) + state.AddBalance(header.Coinbase, reward) + // No block rewards in PoA, so the state remains as is and uncles are dropped header.Root = state.IntermediateRoot(chain.Config().IsEIP158(header.Number)) header.UncleHash = types.CalcUncleHash(nil)