ajust sending height once wallet open
@@ -49,6 +49,9 @@ func (c *Jrpc) GetHeight(req *types.ReqString, result *interface{}) error {
}
data, err := c.cli.GetTitle(context.Background(), req)
+ if err != nil{
+ return err
+ }
*result = *data
return err
@@ -68,6 +71,9 @@ func (c *channelClient) ListTitles(ctx context.Context, req *types.ReqNil) (*pt.
// ListTitles get paracross consensus titles list
func (c *Jrpc) ListTitles(req *types.ReqNil, result *interface{}) error {
data, err := c.cli.ListTitles(context.Background(), req)
+ if err != nil{
+ return err
+ }
*result = data
return err
}
@@ -89,6 +95,9 @@ func (c *Jrpc) GetTitleHeight(req *pt.ReqParacrossTitleHeight, result *interface
return types.ErrInvalidParam
}
data, err := c.cli.GetTitleHeight(context.Background(), req)
+ if err != nil{
+ return err
+ }
*result = data
return err
}
@@ -121,6 +130,9 @@ func (c *Jrpc) GetAssetTxResult(req *types.ReqHash, result *interface{}) error {
return types.ErrInvalidParam
}
data, err := c.cli.GetAssetTxResult(context.Background(), req)
+ if err != nil{
+ return err
+ }
*result = data
return err
}
@@ -175,9 +187,12 @@ func (c *Jrpc) GetBlock2MainInfo(req *types.ReqBlocks, result *interface{}) erro
}
ret, err := c.cli.GetBlock2MainInfo(context.Background(), req)
- *result = *ret
+ if err != nil{
return err
}
+ *result = *ret
+ return nil
+}
// GetNodeAddrStatus get super node status
func (c *channelClient) GetNodeAddrStatus(ctx context.Context, req *pt.ReqParacrossNodeInfo) (*pt.ParaNodeAddrIdStatus, error) {
@@ -245,6 +260,9 @@ func (c *channelClient) ListNodeStatus(ctx context.Context, req *pt.ReqParacross
//ListNodeStatus list super node by status
func (c *Jrpc) ListNodeStatus(req *pt.ReqParacrossNodeInfo, result *interface{}) error {
data, err := c.cli.ListNodeStatus(context.Background(), req)
+ if err != nil{
+ return err
+ }
*result = data
return err
}
@@ -265,6 +283,9 @@ func (c *channelClient) GetNodeGroupAddrs(ctx context.Context, req *pt.ReqParacr
// GetNodeGroupAddrs get super node group addrs
func (c *Jrpc) GetNodeGroupAddrs(req *pt.ReqParacrossNodeInfo, result *interface{}) error {
data, err := c.cli.GetNodeGroupAddrs(context.Background(), req)
+ if err != nil{
+ return err
+ }
*result = data
return err
}
@@ -285,6 +306,9 @@ func (c *channelClient) GetNodeGroupStatus(ctx context.Context, req *pt.ReqParac
// GetNodeGroupStatus get super node group status
func (c *Jrpc) GetNodeGroupStatus(req *pt.ReqParacrossNodeInfo, result *interface{}) error {
data, err := c.cli.GetNodeGroupStatus(context.Background(), req)
+ if err != nil{
+ return err
+ }
*result = data
return err
}
@@ -305,6 +329,9 @@ func (c *channelClient) ListNodeGroupStatus(ctx context.Context, req *pt.ReqPara
//ListNodeGroupStatus list super node group by status
func (c *Jrpc) ListNodeGroupStatus(req *pt.ReqParacrossNodeInfo, result *interface{}) error {
data, err := c.cli.ListNodeGroupStatus(context.Background(), req)
+ if err != nil{
+ return err
+ }
*result = data
return err
}
