Skip to content

Commit 99ac0a4

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 5f99a61 + 113b8c5 commit 99ac0a4

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

cardano-node/src/Cardano/Node/Tracing/Tracers/Consensus.hs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,21 +858,25 @@ instance
858858
, "mempoolSize" .= forMachine dtal mpSzAfter
859859
]
860860
forMachine dtal (TraceMempoolRejectedTx tx txApplyErr mpSz) =
861-
mconcat
861+
mconcat $
862862
[ "kind" .= String "TraceMempoolRejectedTx"
863-
, "err" .= forMachine dtal txApplyErr
864863
, "tx" .= forMachine dtal tx
865864
, "mempoolSize" .= forMachine dtal mpSz
865+
] <>
866+
[ "err" .= forMachine dtal txApplyErr
867+
| dtal >= DDetailed
866868
]
867869
forMachine dtal (TraceMempoolRemoveTxs txs mpSz) =
868870
mconcat
869871
[ "kind" .= String "TraceMempoolRemoveTxs"
870872
, "txs"
871873
.= map
872874
( \(tx, err) ->
873-
Aeson.object
875+
Aeson.object $
874876
[ "tx" .= forMachine dtal (txForgetValidated tx)
875-
, "reason" .= forMachine dtal err
877+
] <>
878+
[ "err" .= forMachine dtal err
879+
| dtal >= DDetailed
876880
]
877881
)
878882
txs

cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,21 +1326,25 @@ instance ( ToObject (ApplyTxErr blk), ToObject (GenTx blk),
13261326
, "mempoolSize" .= toObject verb mpSzAfter
13271327
]
13281328
toObject verb (TraceMempoolRejectedTx tx txApplyErr mpSz) =
1329-
mconcat
1329+
mconcat $
13301330
[ "kind" .= String "TraceMempoolRejectedTx"
1331-
, "err" .= toObject verb txApplyErr
13321331
, "tx" .= toObject verb tx
13331332
, "mempoolSize" .= toObject verb mpSz
1333+
] <>
1334+
[ "err" .= toObject verb txApplyErr
1335+
| verb == MaximalVerbosity
13341336
]
13351337
toObject verb (TraceMempoolRemoveTxs txs mpSz) =
13361338
mconcat
13371339
[ "kind" .= String "TraceMempoolRemoveTxs"
13381340
, "txs"
13391341
.= map
13401342
( \(tx, err) ->
1341-
Aeson.object
1343+
Aeson.object $
13421344
[ "tx" .= toObject verb (txForgetValidated tx)
1343-
, "reason" .= toObject verb err
1345+
] <>
1346+
[ "err" .= toObject verb err
1347+
| verb == MaximalVerbosity
13441348
]
13451349
)
13461350
txs

0 commit comments

Comments
 (0)