From 2524144a2647766d1e8bc39c8d8e766651046278 Mon Sep 17 00:00:00 2001
From: Christian Lohr <christian@volume.finance>
Date: Tue, 27 Jun 2023 19:31:34 +0200
Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20#265=20remove=20yaml=20ma?=
 =?UTF-8?q?rshalling=20in=20endblock=20logging?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Logging the entire message in byte code not only take quite a long
time due to marshalling, it's also largely irrelevant, as message
information can easily be obtained from the queue.
---
 x/consensus/keeper/attest.go   | 3 ---
 x/consensus/types/consensus.go | 8 +++++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/x/consensus/keeper/attest.go b/x/consensus/keeper/attest.go
index da84d041e..97023b887 100644
--- a/x/consensus/keeper/attest.go
+++ b/x/consensus/keeper/attest.go
@@ -1,8 +1,6 @@
 package keeper
 
 import (
-	"fmt"
-
 	sdk "github.com/cosmos/cosmos-sdk/types"
 )
 
@@ -26,7 +24,6 @@ func (k Keeper) CheckAndProcessAttestedMessages(ctx sdk.Context) error {
 					"check-and-process-attested-messages-queue",
 					"id", msg.GetId(),
 					"nonce", msg.Nonce(),
-					"string", fmt.Sprintf("+%v", msg),
 				)
 				cq, err := k.getConsensusQueue(ctx, opt.QueueTypeName)
 				if err != nil {
diff --git a/x/consensus/types/consensus.go b/x/consensus/types/consensus.go
index a5f0cecaa..ed26cadc8 100644
--- a/x/consensus/types/consensus.go
+++ b/x/consensus/types/consensus.go
@@ -8,7 +8,6 @@ import (
 	sdk "github.com/cosmos/cosmos-sdk/types"
 	"github.com/cosmos/gogoproto/proto"
 	xchain "github.com/palomachain/paloma/internal/x-chain"
-	"gopkg.in/yaml.v2"
 )
 
 type ConsensusQueueType string
@@ -63,8 +62,11 @@ type MessageQueuedForBatchingI interface {
 var _ MessageQueuedForBatchingI = &BatchOfConsensusMessages{}
 
 func (q *QueuedSignedMessage) String() string {
-	out, _ := yaml.Marshal(q)
-	return string(out)
+	if q == nil {
+		return ""
+	}
+
+	return fmt.Sprintf("%+v", *q)
 }
 
 func (q *QueuedSignedMessage) AddSignData(data *SignData) {