mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
Add unit test for calculate reward for signers at reward checkpoint.
This commit is contained in:
parent
ec421b98b1
commit
6a76879b85
2 changed files with 5 additions and 7 deletions
|
|
@ -13,6 +13,8 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/ethereum/go-ethereum/log"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/ethereum/go-ethereum/params"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
"github.com/ethereum/go-ethereum/node"
|
||||||
|
"github.com/ethereum/go-ethereum/ethclient"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -189,9 +189,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
if eth.chainConfig.Clique != nil {
|
if eth.chainConfig.Clique != nil {
|
||||||
c := eth.engine.(*clique.Clique)
|
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.
|
// Inject hook for send tx sign to smartcontract after insert block into chain.
|
||||||
importedHook := func(block *types.Block) {
|
importedHook := func(block *types.Block) {
|
||||||
snap, err := c.GetSnapshot(eth.blockchain, block.Header())
|
snap, err := c.GetSnapshot(eth.blockchain, block.Header())
|
||||||
|
|
@ -216,7 +213,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
number := header.Number.Uint64()
|
number := header.Number.Uint64()
|
||||||
rCheckpoint := chain.Config().Clique.RewardCheckpoint
|
rCheckpoint := chain.Config().Clique.RewardCheckpoint
|
||||||
if number > 0 && number-rCheckpoint > 0 {
|
if number > 0 && number-rCheckpoint > 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue