diff --git a/btcjson/dashevoresults.go b/btcjson/dashevoresults.go index 3f0913a22d..315243fbff 100644 --- a/btcjson/dashevoresults.go +++ b/btcjson/dashevoresults.go @@ -25,10 +25,7 @@ type QuorumSignResultWithBool struct { // QuorumVerifyResult models the data from the quorum verify command. // returns a boolean. -type QuorumVerifyResult struct { - // Result is the output if submit was true - Result bool `json:"result,omitempty"` -} +type QuorumVerifyResult bool // UnmarshalJSON is a custom unmarshal because the result can be just a boolean func (qsr *QuorumSignResultWithBool) UnmarshalJSON(data []byte) error { diff --git a/rpcclient/evo.go b/rpcclient/evo.go index a2ce47d85b..2d497c3fb6 100644 --- a/rpcclient/evo.go +++ b/rpcclient/evo.go @@ -186,11 +186,15 @@ func (c *Client) QuorumVerifyAsync(quorumType btcjson.LLMQType, requestID string // QuorumVerify returns a true if the signature is valid and false if not func (c *Client) QuorumVerify(quorumType btcjson.LLMQType, requestID string, messageHash string, signature string, quorumHash string) (bool, error) { - r, err := c.QuorumVerifyAsync(quorumType, requestID, messageHash, signature, quorumHash).Receive() + result, err := c.QuorumVerifyAsync(quorumType, requestID, messageHash, signature, quorumHash).Receive() if err != nil { return false, err } - return r.Result, nil + if result == nil { + return false, fmt.Errorf("no result") + } + + return bool(*result), nil } // ----------------------------- quorum info -----------------------------