From 7cdd436010c1c3b8fc8af7b666a5e25a35ad1aee Mon Sep 17 00:00:00 2001 From: Frank Zheng Date: Thu, 13 Nov 2025 16:42:49 +0800 Subject: [PATCH] fix: normalize the stream price of FeedPrice type --- injective-chain/stream/server/handlers.go | 2 +- injectived.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/injective-chain/stream/server/handlers.go b/injective-chain/stream/server/handlers.go index 1d56debb..d9d921ef 100644 --- a/injective-chain/stream/server/handlers.go +++ b/injective-chain/stream/server/handlers.go @@ -426,7 +426,7 @@ func handleSetProviderPriceEvent(inBuffer *v2.StreamResponseMap, ev *oracletypes func handleSetPriceFeedPriceEvent(inBuffer *v2.StreamResponseMap, ev *oracletypes.SetPriceFeedPriceEvent) { price := &v2.OraclePrice{ - Symbol: ev.Base, + Symbol: fmt.Sprintf("%s/%s", ev.Base, ev.Quote), Price: ev.Price, Type: "pricefeed", } diff --git a/injectived.sh b/injectived.sh index 6f5c6741..1ae8b591 100755 --- a/injectived.sh +++ b/injectived.sh @@ -8,6 +8,10 @@ if [ -z "$INJHOME" ]; then echo "INJHOME not set, defaulting to HOME directory: $INJHOME" fi +CHAINSTREAM_ADDR=${CHAINSTREAM_ADDR:-0.0.0.0:9999} +CHAINSTREAM_BUFFER_CAP=${CHAINSTREAM_BUFFER_CAP:-1000} +CHAINSTREAM_PUBLISHER_BUFFER_CAP=${CHAINSTREAM_PUBLISHER_BUFFER_CAP:-1000} + yes 12345678 | injectived \ --log-level "info" \ --rpc.laddr "tcp://0.0.0.0:26657" \ @@ -18,5 +22,8 @@ yes 12345678 | injectived \ --json-rpc.allow-unprotected-txs=true \ --json-rpc.txfee-cap=50 \ --optimistic-execution-enabled true \ + --chainstream-server "$CHAINSTREAM_ADDR" \ + --chainstream-buffer-cap "$CHAINSTREAM_BUFFER_CAP" \ + --chainstream-publisher-buffer-cap "$CHAINSTREAM_PUBLISHER_BUFFER_CAP" \ --home "$INJHOME" \ start