From 141dd172cee1f6b53dcbe91d2f28b29dba1c24a4 Mon Sep 17 00:00:00 2001 From: Ran Mishael <106548467+ranlavanet@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:51:06 +0100 Subject: [PATCH] remove requested block after cache hit (#1159) --- protocol/rpcconsumer/rpcconsumer_server.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/protocol/rpcconsumer/rpcconsumer_server.go b/protocol/rpcconsumer/rpcconsumer_server.go index ad9673bfc4..11036529c8 100644 --- a/protocol/rpcconsumer/rpcconsumer_server.go +++ b/protocol/rpcconsumer/rpcconsumer_server.go @@ -444,8 +444,13 @@ func (rpccs *RPCConsumerServer) sendRelayToProvider( if cacheError == nil && reply != nil { // Info was fetched from cache, so we don't need to change the state // so we can return here, no need to update anything and calculate as this info was fetched from the cache - relayResult = &common.RelayResult{Reply: reply, Request: &pairingtypes.RelayRequest{RelayData: relayRequestData}} - lavaprotocol.SetRequestedBlockNotApplicable(relayResult.Request.RelayData) + relayResult = &common.RelayResult{ + Reply: reply, + Request: &pairingtypes.RelayRequest{ + RelayData: relayRequestData, + }, + Finalized: false, // set false to skip data reliability + } return relayResult, nil } // cache failed, move on to regular relay