core: fix import errors on clique crashes + empty blocks (#19544)
* core: fix import errors on clique crashes + empty blocks * cosensus/clique, core: add test for the mirrored state issue * core: address todo question wrt log count * core: raise a louder warning for non-clique known blocks
This commit is contained in:
@ -71,6 +71,13 @@ func (b *BlockGen) SetNonce(nonce types.BlockNonce) {
|
||||
b.header.Nonce = nonce
|
||||
}
|
||||
|
||||
// SetDifficulty sets the difficulty field of the generated block. This method is
|
||||
// useful for Clique tests where the difficulty does not depend on time. For the
|
||||
// ethash tests, please use OffsetTime, which implicitly recalculates the diff.
|
||||
func (b *BlockGen) SetDifficulty(diff *big.Int) {
|
||||
b.header.Difficulty = diff
|
||||
}
|
||||
|
||||
// AddTx adds a transaction to the generated block. If no coinbase has
|
||||
// been set, the block's coinbase is set to the zero address.
|
||||
//
|
||||
|
Reference in New Issue
Block a user