From c4b144821204f7f76e1d63bea4af628baf150276 Mon Sep 17 00:00:00 2001 From: ly <58056533+devlzcode@users.noreply.github.com> Date: Thu, 25 Jan 2024 19:24:23 -0800 Subject: [PATCH] feat: Expose newFutureError for developer friendliness --- rpcclient/infrastructure.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpcclient/infrastructure.go b/rpcclient/infrastructure.go index 258ed130f9..8543106b15 100644 --- a/rpcclient/infrastructure.go +++ b/rpcclient/infrastructure.go @@ -984,6 +984,11 @@ func newFutureError(err error) chan *Response { return responseChan } +// Expose newFutureError for developer usage when creating custom commands. +func NewFutureError(err error) chan *Response { + return newFutureError(err) +} + // ReceiveFuture receives from the passed futureResult channel to extract a // reply or any errors. The examined errors include an error in the // futureResult and the error in the reply from the server. This will block