fix: fix the wrong error return value
Signed-off-by: wellweek <xiezitai@outlook.com>
This commit is contained in:
parent
82ebcbfd66
commit
1cc97b10d0
|
@ -258,7 +258,7 @@ func GetLightdInfo() (*walletrpc.LightdInfo, error) {
|
||||||
var getinfoReply ZcashdRpcReplyGetinfo
|
var getinfoReply ZcashdRpcReplyGetinfo
|
||||||
err := json.Unmarshal(result, &getinfoReply)
|
err := json.Unmarshal(result, &getinfoReply)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, rpcErr
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
result, rpcErr = RawRequest("getblockchaininfo", []json.RawMessage{})
|
result, rpcErr = RawRequest("getblockchaininfo", []json.RawMessage{})
|
||||||
|
@ -268,7 +268,7 @@ func GetLightdInfo() (*walletrpc.LightdInfo, error) {
|
||||||
var getblockchaininfoReply ZcashdRpcReplyGetblockchaininfo
|
var getblockchaininfoReply ZcashdRpcReplyGetblockchaininfo
|
||||||
err = json.Unmarshal(result, &getblockchaininfoReply)
|
err = json.Unmarshal(result, &getblockchaininfoReply)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, rpcErr
|
return nil, err
|
||||||
}
|
}
|
||||||
// If the sapling consensus branch doesn't exist, it must be regtest
|
// If the sapling consensus branch doesn't exist, it must be regtest
|
||||||
var saplingHeight int
|
var saplingHeight int
|
||||||
|
|
Loading…
Reference in New Issue