mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 13:44:31 +00:00
fix conflict
This commit is contained in:
parent
b43bb5ed1f
commit
5f1fb22e51
2 changed files with 12 additions and 0 deletions
|
|
@ -17,6 +17,7 @@
|
|||
package XDPoS
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
|
||||
|
|
@ -549,3 +550,13 @@ func (x *XDPoS) CacheSigningTxs(hash common.Hash, txs []*types.Transaction) []*t
|
|||
func (x *XDPoS) GetCachedSigningTxs(hash common.Hash) (interface{}, bool) {
|
||||
return x.signingTxsCache.Get(hash)
|
||||
}
|
||||
|
||||
func (x *XDPoS) GetEpochSwitchInfoBetween(chain consensus.ChainReader, begin, end *types.Header) ([]*types.EpochSwitchInfo, error) {
|
||||
beginBlockVersion := x.config.BlockConsensusVersion(begin.Number, begin.Extra, ExtraFieldCheck)
|
||||
endBlockVersion := x.config.BlockConsensusVersion(end.Number, end.Extra, ExtraFieldCheck)
|
||||
if beginBlockVersion == params.ConsensusEngineVersion2 && endBlockVersion == params.ConsensusEngineVersion2 {
|
||||
return x.EngineV2.GetEpochSwitchInfoBetween(chain, begin, end)
|
||||
}
|
||||
// Default "v1"
|
||||
return nil, errors.New("not supported in the v1 consensus")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package engine_v2
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue