{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/17524","repository_url":"https://api.github.com/repos/ethereum/go-ethereum","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/17524/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/17524/comments","events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/17524/events","html_url":"https://github.com/ethereum/go-ethereum/issues/17524","id":354277303,"node_id":"MDU6SXNzdWUzNTQyNzczMDM=","number":17524,"title":"Addition of BlockReward in Clique","user":{"login":"HunainAmer","id":36266710,"node_id":"MDQ6VXNlcjM2MjY2NzEw","avatar_url":"https://avatars0.githubusercontent.com/u/36266710?v=4","gravatar_id":"","url":"https://api.github.com/users/HunainAmer","html_url":"https://github.com/HunainAmer","followers_url":"https://api.github.com/users/HunainAmer/followers","following_url":"https://api.github.com/users/HunainAmer/following{/other_user}","gists_url":"https://api.github.com/users/HunainAmer/gists{/gist_id}","starred_url":"https://api.github.com/users/HunainAmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HunainAmer/subscriptions","organizations_url":"https://api.github.com/users/HunainAmer/orgs","repos_url":"https://api.github.com/users/HunainAmer/repos","events_url":"https://api.github.com/users/HunainAmer/events{/privacy}","received_events_url":"https://api.github.com/users/HunainAmer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-27T11:13:24Z","updated_at":"2018-08-27T12:53:02Z","closed_at":null,"author_association":"NONE","body":"i am trying to add block reward in clique . i have copied this code from Consensus/ethash/consensus.go and paste in Consensus/clique/clique.go.\r\n\r\n my code is  \r\n\r\n```func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header *types.Header, uncles []*types.Header) {\r\n\t\t// Select the correct block reward based on chain progression\r\n\t\tblockReward := FrontierBlockReward\r\n\t\tif config.IsByzantium(header.Number) {\r\n\t\t\tblockReward = ByzantiumBlockReward\r\n\t\t}\r\n\t\t// Accumulate the rewards for the miner and any included uncles\r\n\t\treward := new(big.Int).Set(blockReward)\r\n\t\tr := new(big.Int)\r\n\t\tfor _, uncle := range uncles {\r\n\t\t\tr.Add(uncle.Number, big8)\r\n\t\t\tr.Sub(r, header.Number)\r\n\t\t\tr.Mul(r, blockReward)\r\n\t\t\tr.Div(r, big8)\r\n\t\t\tstate.AddBalance(uncle.Coinbase, r)\r\n\t\r\n\t\t\tr.Div(blockReward, big32)\r\n\t\t\treward.Add(reward, r)\r\n\t\t}\r\n\t\tstate.AddBalance(header.Coinbase, reward)\r\n```\r\n\r\nand call accumulateRewards function in Finalize function.\r\nMy finalize function is \r\n\r\n```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) {\r\n\t// No block rewards in PoA, so the state remains as is and uncles are dropped\r\n\taccumulateRewards(chain.Config(), state, header, uncles)\r\n\r\n\theader.Root = state.IntermediateRoot(chain.Config().IsEIP158(header.Number))\r\n\theader.UncleHash = types.CalcUncleHash(nil)\r\n\r\n\t// Assemble and return the final block for sealing\r\n\treturn types.NewBlock(header, txs, nil, receipts), nil\r\n}\r\n```\r\n\r\nAfter these changing when i run make all command for rebuild  this error i will be face.\r\nError.\r\n\r\n```\r\n/usr/local/Cellar/go/1.10.3/libexec/bin/go install -ldflags -s -v github.com/ethereum/go-ethereum github.com/ethereum/go-ethereum/accounts github.com/ethereum/go-ethereum/accounts/abi github.com/ethereum/go-ethereum/accounts/abi/bind github.com/ethereum/go-ethereum/accounts/abi/bind/backends github.com/ethereum/go-ethereum/accounts/keystore github.com/ethereum/go-ethereum/accounts/usbwallet github.com/ethereum/go-ethereum/accounts/usbwallet/internal/trezor github.com/ethereum/go-ethereum/cmd/abigen github.com/ethereum/go-ethereum/cmd/bootnode github.com/ethereum/go-ethereum/cmd/clef github.com/ethereum/go-ethereum/cmd/ethkey github.com/ethereum/go-ethereum/cmd/evm github.com/ethereum/go-ethereum/cmd/evm/internal/compiler github.com/ethereum/go-ethereum/cmd/faucet github.com/ethereum/go-ethereum/cmd/geth github.com/ethereum/go-ethereum/cmd/internal/browser github.com/ethereum/go-ethereum/cmd/p2psim github.com/ethereum/go-ethereum/cmd/puppeth github.com/ethereum/go-ethereum/cmd/rlpdump github.com/ethereum/go-ethereum/cmd/swarm github.com/ethereum/go-ethereum/cmd/swarm/swarm-smoke github.com/ethereum/go-ethereum/cmd/utils github.com/ethereum/go-ethereum/cmd/wnode github.com/ethereum/go-ethereum/common github.com/ethereum/go-ethereum/common/bitutil github.com/ethereum/go-ethereum/common/compiler github.com/ethereum/go-ethereum/common/fdlimit github.com/ethereum/go-ethereum/common/hexutil github.com/ethereum/go-ethereum/common/math github.com/ethereum/go-ethereum/common/mclock github.com/ethereum/go-ethereum/common/prque github.com/ethereum/go-ethereum/consensus github.com/ethereum/go-ethereum/consensus/clique github.com/ethereum/go-ethereum/consensus/ethash github.com/ethereum/go-ethereum/consensus/misc github.com/ethereum/go-ethereum/console github.com/ethereum/go-ethereum/contracts/chequebook github.com/ethereum/go-ethereum/contracts/chequebook/contract github.com/ethereum/go-ethereum/contracts/ens github.com/ethereum/go-ethereum/contracts/ens/contract github.com/ethereum/go-ethereum/core github.com/ethereum/go-ethereum/core/asm github.com/ethereum/go-ethereum/core/bloombits github.com/ethereum/go-ethereum/core/rawdb github.com/ethereum/go-ethereum/core/state github.com/ethereum/go-ethereum/core/types github.com/ethereum/go-ethereum/core/vm github.com/ethereum/go-ethereum/core/vm/runtime github.com/ethereum/go-ethereum/crypto github.com/ethereum/go-ethereum/crypto/bn256 github.com/ethereum/go-ethereum/crypto/bn256/cloudflare github.com/ethereum/go-ethereum/crypto/bn256/google github.com/ethereum/go-ethereum/crypto/ecies github.com/ethereum/go-ethereum/crypto/secp256k1 github.com/ethereum/go-ethereum/crypto/sha3 github.com/ethereum/go-ethereum/dashboard github.com/ethereum/go-ethereum/eth github.com/ethereum/go-ethereum/eth/downloader github.com/ethereum/go-ethereum/eth/fetcher github.com/ethereum/go-ethereum/eth/filters github.com/ethereum/go-ethereum/eth/gasprice github.com/ethereum/go-ethereum/eth/tracers github.com/ethereum/go-ethereum/eth/tracers/internal/tracers github.com/ethereum/go-ethereum/ethclient github.com/ethereum/go-ethereum/ethdb github.com/ethereum/go-ethereum/ethstats github.com/ethereum/go-ethereum/event github.com/ethereum/go-ethereum/event/filter github.com/ethereum/go-ethereum/internal/build github.com/ethereum/go-ethereum/internal/cmdtest github.com/ethereum/go-ethereum/internal/debug github.com/ethereum/go-ethereum/internal/ethapi github.com/ethereum/go-ethereum/internal/guide github.com/ethereum/go-ethereum/internal/jsre github.com/ethereum/go-ethereum/internal/jsre/deps github.com/ethereum/go-ethereum/internal/web3ext github.com/ethereum/go-ethereum/les github.com/ethereum/go-ethereum/les/flowcontrol github.com/ethereum/go-ethereum/light github.com/ethereum/go-ethereum/log github.com/ethereum/go-ethereum/log/term github.com/ethereum/go-ethereum/metrics github.com/ethereum/go-ethereum/metrics/exp github.com/ethereum/go-ethereum/metrics/influxdb github.com/ethereum/go-ethereum/metrics/librato github.com/ethereum/go-ethereum/miner github.com/ethereum/go-ethereum/mobile github.com/ethereum/go-ethereum/node github.com/ethereum/go-ethereum/p2p github.com/ethereum/go-ethereum/p2p/discover github.com/ethereum/go-ethereum/p2p/discv5 github.com/ethereum/go-ethereum/p2p/enr github.com/ethereum/go-ethereum/p2p/nat github.com/ethereum/go-ethereum/p2p/netutil github.com/ethereum/go-ethereum/p2p/protocols github.com/ethereum/go-ethereum/p2p/simulations github.com/ethereum/go-ethereum/p2p/simulations/adapters github.com/ethereum/go-ethereum/p2p/simulations/examples github.com/ethereum/go-ethereum/p2p/simulations/pipes github.com/ethereum/go-ethereum/p2p/testing github.com/ethereum/go-ethereum/params github.com/ethereum/go-ethereum/rlp github.com/ethereum/go-ethereum/rpc github.com/ethereum/go-ethereum/signer/core github.com/ethereum/go-ethereum/signer/rules github.com/ethereum/go-ethereum/signer/rules/deps github.com/ethereum/go-ethereum/signer/storage github.com/ethereum/go-ethereum/swarm github.com/ethereum/go-ethereum/swarm/api github.com/ethereum/go-ethereum/swarm/api/client github.com/ethereum/go-ethereum/swarm/api/http github.com/ethereum/go-ethereum/swarm/bmt github.com/ethereum/go-ethereum/swarm/chunk github.com/ethereum/go-ethereum/swarm/fuse github.com/ethereum/go-ethereum/swarm/log github.com/ethereum/go-ethereum/swarm/metrics github.com/ethereum/go-ethereum/swarm/multihash github.com/ethereum/go-ethereum/swarm/network github.com/ethereum/go-ethereum/swarm/network/bitvector github.com/ethereum/go-ethereum/swarm/network/priorityqueue github.com/ethereum/go-ethereum/swarm/network/simulation github.com/ethereum/go-ethereum/swarm/network/simulations github.com/ethereum/go-ethereum/swarm/network/simulations/discovery github.com/ethereum/go-ethereum/swarm/network/stream github.com/ethereum/go-ethereum/swarm/network/stream/intervals github.com/ethereum/go-ethereum/swarm/pot github.com/ethereum/go-ethereum/swarm/pss github.com/ethereum/go-ethereum/swarm/pss/client github.com/ethereum/go-ethereum/swarm/pss/notify github.com/ethereum/go-ethereum/swarm/sctx github.com/ethereum/go-ethereum/swarm/services/swap github.com/ethereum/go-ethereum/swarm/services/swap/swap github.com/ethereum/go-ethereum/swarm/spancontext github.com/ethereum/go-ethereum/swarm/state github.com/ethereum/go-ethereum/swarm/storage github.com/ethereum/go-ethereum/swarm/storage/encryption github.com/ethereum/go-ethereum/swarm/storage/mock github.com/ethereum/go-ethereum/swarm/storage/mock/db github.com/ethereum/go-ethereum/swarm/storage/mock/mem github.com/ethereum/go-ethereum/swarm/storage/mock/rpc github.com/ethereum/go-ethereum/swarm/storage/mock/test github.com/ethereum/go-ethereum/swarm/storage/mru github.com/ethereum/go-ethereum/swarm/testutil github.com/ethereum/go-ethereum/swarm/tracing github.com/ethereum/go-ethereum/swarm/version github.com/ethereum/go-ethereum/tests github.com/ethereum/go-ethereum/trie github.com/ethereum/go-ethereum/whisper/mailserver github.com/ethereum/go-ethereum/whisper/shhclient github.com/ethereum/go-ethereum/whisper/whisperv5 github.com/ethereum/go-ethereum/whisper/whisperv6 \r\ngithub.com/ethereum/go-ethereum/consensus/clique\r\n# github.com/ethereum/go-ethereum/consensus/clique\r\nconsensus/clique/clique.go:695:7: syntax error: unexpected accumulateRewards, expecting (\r\nutil.go:45: exit status 2\r\nexit status 1\r\nmake: *** [all] Error 1\r\n```\r\n \r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments/416216416","html_url":"https://github.com/ethereum/go-ethereum/issues/17524#issuecomment-416216416","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/17524","id":416216416,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjIxNjQxNg==","user":{"login":"karalabe","id":129561,"node_id":"MDQ6VXNlcjEyOTU2MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/129561?v=4","gravatar_id":"","url":"https://api.github.com/users/karalabe","html_url":"https://github.com/karalabe","followers_url":"https://api.github.com/users/karalabe/followers","following_url":"https://api.github.com/users/karalabe/following{/other_user}","gists_url":"https://api.github.com/users/karalabe/gists{/gist_id}","starred_url":"https://api.github.com/users/karalabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karalabe/subscriptions","organizations_url":"https://api.github.com/users/karalabe/orgs","repos_url":"https://api.github.com/users/karalabe/repos","events_url":"https://api.github.com/users/karalabe/events{/privacy}","received_events_url":"https://api.github.com/users/karalabe/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T12:53:02Z","updated_at":"2018-08-27T12:53:02Z","author_association":"MEMBER","body":"You're missing a closing brace for the `accumulateRewards` function body."}}
{"actor":{"display_login":"karalabe"}}