From 7892293856d4e3d145dff6cc4db2af482619d287 Mon Sep 17 00:00:00 2001 From: dinhln89 Date: Mon, 25 Jun 2018 17:03:05 +0700 Subject: [PATCH] Add unit test for calculate reward for signers at reward checkpoint. --- contracts/utils.go | 2 ++ eth/backend.go | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/contracts/utils.go b/contracts/utils.go index 6102f9504d..c6d55a95ed 100644 --- a/contracts/utils.go +++ b/contracts/utils.go @@ -13,6 +13,8 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "math/big" + "github.com/ethereum/go-ethereum/node" + "github.com/ethereum/go-ethereum/ethclient" ) const ( diff --git a/eth/backend.go b/eth/backend.go index 7186462ca9..94e4f3c335 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -189,9 +189,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { if eth.chainConfig.Clique != nil { c := eth.engine.(*clique.Clique) - // Set global ipc endpoint. - eth.IPCEndpoint = ctx.GetConfig().IPCEndpoint() - // Inject hook for send tx sign to smartcontract after insert block into chain. importedHook := func(block *types.Block) { snap, err := c.GetSnapshot(eth.blockchain, block.Header()) @@ -216,7 +213,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { return err } - number := header.Number.Uint64() rCheckpoint := chain.Config().Clique.RewardCheckpoint if number > 0 && number-rCheckpoint > 0 {