Fix error throwing bug that lead to block creation inconsistencies (#212)

* removed error throwing within the AttestMachine method
* add more extensive logging around that call

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2023-12-06 11:20:37 +01:00 committed by GitHub
parent 0455176123
commit ff6aab33df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")