新增测试模块

This commit is contained in:
boyce
2019-09-23 14:38:44 +08:00
parent 6e1ccc9a36
commit 9623cd2735
11 changed files with 298 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package main
import (
"github.com/duanhf2012/origin/originnode"
"github.com/duanhf2012/origin/service"
)
type SubNet2_Service1 struct {
service.BaseService
}
func init() {
originnode.InitService(&SubNet2_Service1{})
}
//OnInit ...
func (ws *SubNet2_Service1) OnInit() error {
return nil
}
//OnRun ...
func (ws *SubNet2_Service1) OnRun() bool {
return false
}
func (slf *SubNet2_Service1) RPC_Multi(arg *InputData, ret *int) error {
*ret = arg.A1 * arg.A2
return nil
}