fix: fix the wrong error return value

Signed-off-by: wellweek <xiezitai@outlook.com>
This commit is contained in:
wellweek 2025-03-21 14:16:32 +08:00 committed by Larry Ruane
parent 82ebcbfd66
commit 1cc97b10d0
1 changed files with 2 additions and 2 deletions

View File

@ -258,7 +258,7 @@ func GetLightdInfo() (*walletrpc.LightdInfo, error) {
var getinfoReply ZcashdRpcReplyGetinfo
err := json.Unmarshal(result, &getinfoReply)
if err != nil {
return nil, rpcErr
return nil, err
}
result, rpcErr = RawRequest("getblockchaininfo", []json.RawMessage{})
@ -268,7 +268,7 @@ func GetLightdInfo() (*walletrpc.LightdInfo, error) {
var getblockchaininfoReply ZcashdRpcReplyGetblockchaininfo
err = json.Unmarshal(result, &getblockchaininfoReply)
if err != nil {
return nil, rpcErr
return nil, err
}
// If the sapling consensus branch doesn't exist, it must be regtest
var saplingHeight int