From caf5dfdd935478b2b8448a8ad5e182d9489b6d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Thu, 7 Mar 2024 17:11:03 +0100 Subject: [PATCH] removed call to fatal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Eckel --- util/elementsd_connector.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util/elementsd_connector.go b/util/elementsd_connector.go index 29794c1..88e890c 100644 --- a/util/elementsd_connector.go +++ b/util/elementsd_connector.go @@ -4,7 +4,6 @@ import ( "crypto/sha256" "encoding/json" "fmt" - "log" "strings" "sync" @@ -14,7 +13,8 @@ import ( ) var ( - // this mutex has to protect all signing and crafting transactions so that UTXOs are not spend twice by accident + // this mutex has to protect all signing and crafting of transactions and their inputs + // so that UTXOs are not spend twice by accident elementsSyncAccess sync.Mutex ) @@ -135,7 +135,8 @@ func IssueNFTAsset(name string, machineAddress string, domain string) (assetID s testMempoolAcceptResult := testMempoolAcceptResults[len(testMempoolAcceptResults)-1] if !testMempoolAcceptResult.Allowed { - log.Fatalln("not accepted by mempool") + err = fmt.Errorf("not accepted by mempool: %+v %+v\n", testMempoolAcceptResult, signRawTransactionWithWalletResult) + return } hex, err = elements.SendRawTransaction(url, []string{signRawTransactionWithWalletResult.Hex})