mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
rename parameter in GenerateBadBlock. remove unecessary comment
This commit is contained in:
parent
0c3eb5fbd9
commit
1fbde1abaf
1 changed files with 2 additions and 4 deletions
|
|
@ -360,9 +360,9 @@ func TestStateProcessorErrors(t *testing.T) {
|
||||||
// valid, and no proper post-state can be made. But from the perspective of the blockchain, the block is sufficiently
|
// valid, and no proper post-state can be made. But from the perspective of the blockchain, the block is sufficiently
|
||||||
// valid to be considered for import:
|
// valid to be considered for import:
|
||||||
// - valid pow (fake), ancestry, difficulty, gaslimit etc
|
// - valid pow (fake), ancestry, difficulty, gaslimit etc
|
||||||
func GenerateBadBlock(parent *types.Block, engine consensus.Engine, txs types.Transactions, config *params.ChainConfig, powMode bool) *types.Block {
|
func GenerateBadBlock(parent *types.Block, engine consensus.Engine, txs types.Transactions, config *params.ChainConfig, isPOW bool) *types.Block {
|
||||||
difficulty := big.NewInt(0)
|
difficulty := big.NewInt(0)
|
||||||
if powMode {
|
if isPOW {
|
||||||
fakeChainReader := newChainMaker(nil, config, engine)
|
fakeChainReader := newChainMaker(nil, config, engine)
|
||||||
difficulty = engine.CalcDifficulty(fakeChainReader, parent.Time()+10, &types.Header{
|
difficulty = engine.CalcDifficulty(fakeChainReader, parent.Time()+10, &types.Header{
|
||||||
Number: parent.Number(),
|
Number: parent.Number(),
|
||||||
|
|
@ -456,8 +456,6 @@ func TestProcessVerkle(t *testing.T) {
|
||||||
ShanghaiTime: u64(0),
|
ShanghaiTime: u64(0),
|
||||||
VerkleTime: u64(0),
|
VerkleTime: u64(0),
|
||||||
TerminalTotalDifficulty: common.Big0,
|
TerminalTotalDifficulty: common.Big0,
|
||||||
// TODO uncomment when proof generation is merged
|
|
||||||
// ProofInBlocks: true,
|
|
||||||
}
|
}
|
||||||
signer = types.LatestSigner(config)
|
signer = types.LatestSigner(config)
|
||||||
testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue