From ff6aab33df5e5272c9363c49faaf188372c4509a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Wed, 6 Dec 2023 11:20:37 +0100 Subject: [PATCH] Fix error throwing bug that lead to block creation inconsistencies (#212) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * removed error throwing within the AttestMachine method * add more extensive logging around that call Signed-off-by: Jürgen Eckel --- x/machine/keeper/msg_server_attest_machine.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x/machine/keeper/msg_server_attest_machine.go b/x/machine/keeper/msg_server_attest_machine.go index a889573..e0421c0 100644 --- a/x/machine/keeper/msg_server_attest_machine.go +++ b/x/machine/keeper/msg_server_attest_machine.go @@ -56,7 +56,9 @@ func (k msgServer) AttestMachine(goCtx context.Context, msg *types.MsgAttestMach util.GetAppLogger().Info(ctx, "Issuing Machine NFT") err := k.issueMachineNFT(goCtx, msg.Machine) if err != nil { - return nil, types.ErrNFTIssuanceFailed + util.GetAppLogger().Error(ctx, "Machine NFT issuance failed : "+err.Error()) + } else { + util.GetAppLogger().Info(ctx, "Machine NFT issuance successful") } } else { util.GetAppLogger().Info(ctx, "skipping Machine NFT issuance")