From 889b733814029104c4d3b9257a0897dcb85e2995 Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 11 Dec 2024 14:52:13 +0000 Subject: [PATCH] slot checking --- grpc-server.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/grpc-server.go b/grpc-server.go index a98c966..a04c200 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -811,7 +811,8 @@ func (multi *MultiEpoch) processSlotTransactions( txResp.Transaction.Transaction = tx.Transaction txResp.Transaction.Meta = tx.Meta txResp.Transaction.Index = tx.Index - // how to get blocktime + + // To do: add blocketime after index work is done } if err := ser.Send(txResp); err != nil { @@ -855,6 +856,9 @@ func (multi *MultiEpoch) processSlotTransactions( return status.Errorf(codes.NotFound, "Epoch %d is not available", epochNumber) } for _, txn := range txns { + if slot != uint64(txn.Slot) { // If the transaction is not in the requested slot, skip + continue + } tx, meta, err := parseTransactionAndMetaFromNode(txn, epochHandler.GetDataFrameByCid) if err != nil { return status.Errorf(codes.Internal, "Failed to parse transaction from node: %v", err) @@ -875,7 +879,8 @@ func (multi *MultiEpoch) processSlotTransactions( return status.Errorf(codes.Internal, "Failed to get transaction: %v", err) } txResp.Slot = uint64(txn.Slot) - // What to do for blocktime? + + // To do: add blocketime after index work is done } if err := ser.Send(txResp); err != nil {