Esempio n. 1
0
func CreateAndPopulateTestStateForFER(testEntries []FEREntryWithHeight, desiredHeight int) *state.State {
	s := new(state.State)
	s.DB = CreateAndPopulateTestDatabaseOverlayForFER(testEntries, desiredHeight)
	s.LoadConfig("", "")
	s.Init()
	/*err := s.RecalculateBalances()
	if err != nil {
		panic(err)
	}*/
	s.SetFactoshisPerEC(1)
	state.LoadDatabase(s)
	s.FERChainId = "111111118d918a8be684e0dac725493a75862ef96d2d3f43f84b26969329bf03"
	s.UpdateState()
	go s.ValidatorLoop()
	time.Sleep(20 * time.Millisecond)

	return s
}