mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
* V2 truncate MaxMasternodes from candidates after penalty, V1 same as before TestUpdateMultipleMasterNodes: test V2, in snapshot we have all candidates, but at epoch switch, we pick MaxMasternodes * code looks better
18 lines
421 B
Go
18 lines
421 B
Go
package XDPoS
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/XinFinOrg/XDPoSChain/core/rawdb"
|
|
"github.com/XinFinOrg/XDPoSChain/params"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestAdaptorShouldShareDbWithV1Engine(t *testing.T) {
|
|
database := rawdb.NewMemoryDatabase()
|
|
config := params.TestXDPoSMockChainConfig
|
|
engine := New(config, database)
|
|
|
|
assert := assert.New(t)
|
|
assert.Equal(engine.EngineV1.GetDb(), engine.GetDb())
|
|
}
|