From 9382057e06716003fc86575395d5c27ceb6e2201 Mon Sep 17 00:00:00 2001 From: Urvi Date: Mon, 13 Nov 2023 12:20:48 -0800 Subject: [PATCH] Add comment for converting json bytes to string --- services/horizon/internal/db2/history/liquidity_pools.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/horizon/internal/db2/history/liquidity_pools.go b/services/horizon/internal/db2/history/liquidity_pools.go index 50c2e02cd9..c4d0a6e6c9 100644 --- a/services/horizon/internal/db2/history/liquidity_pools.go +++ b/services/horizon/internal/db2/history/liquidity_pools.go @@ -37,6 +37,8 @@ type LiquidityPool struct { type LiquidityPoolAssetReserves []LiquidityPoolAssetReserve func (c LiquidityPoolAssetReserves) Value() (driver.Value, error) { + // Convert the byte array into a string as a workaround to bypass buggy encoding in the pq driver + // (More info about this bug here https://github.com/stellar/go/issues/5086#issuecomment-1773215436). val, err := json.Marshal(c) return string(val), err }