예제 #1
0
파일: helper.go 프로젝트: yoshiharay/fabric
// NewHelper constructs the consensus helper object
func NewHelper(mhc peer.MessageHandlerCoordinator) *Helper {
	h := &Helper{
		coordinator: mhc,
		secOn:       viper.GetBool("security.enabled"),
		secHelper:   mhc.GetSecHelper(),
		valid:       true, // Assume our state is consistent until we are told otherwise, actual consensus (pbft) will invalidate this immediately, but noops will not
	}

	h.executor = executor.NewImpl(h, h, mhc)
	return h
}
예제 #2
0
// NewHelper constructs the consensus helper object
func NewHelper(mhc peer.MessageHandlerCoordinator) *Helper {
	h := &Helper{
		coordinator: mhc,
		secOn:       viper.GetBool("security.enabled"),
		secHelper:   mhc.GetSecHelper(),
	}
	h.sts = statetransfer.NewStateTransferState(h)
	h.sts.Initiate(nil)
	h.sts.RegisterListener(h)
	return h
}
예제 #3
0
// NewHelper constructs the consensus helper object
func NewHelper(mhc peer.MessageHandlerCoordinator) *Helper {
	h := &Helper{
		coordinator: mhc,
		secOn:       viper.GetBool("security.enabled"),
		secHelper:   mhc.GetSecHelper(),
		valid:       true, // Assume our state is consistent until we are told otherwise, TODO: revisit
	}
	h.sts = statetransfer.NewStateTransferState(mhc)
	h.sts.RegisterListener(h)
	return h
}
예제 #4
0
파일: helper.go 프로젝트: yoshi-mori/fabric
// NewHelper constructs the consensus helper object
func NewHelper(mhc peer.MessageHandlerCoordinator) *Helper {
	h := &Helper{
		coordinator: mhc,
		secOn:       viper.GetBool("security.enabled"),
		secHelper:   mhc.GetSecHelper(),
		valid:       true, // Assume our state is consistent until we are told otherwise, TODO: revisit
	}

	h.executor = executor.NewImpl(h, h, mhc)
	h.executor.Start()
	return h
}