From b82e8ed99ad10fc7152fd5e6630845609c5281e8 Mon Sep 17 00:00:00 2001 From: Ales Verbic Date: Sun, 29 Sep 2024 08:12:48 -0400 Subject: [PATCH] fix: string casting in DumpHistory & FetchBlock (#260) Signed-off-by: Ales Verbic --- internal/utxorpc/sync.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/utxorpc/sync.go b/internal/utxorpc/sync.go index beab9b8..3f2f42b 100644 --- a/internal/utxorpc/sync.go +++ b/internal/utxorpc/sync.go @@ -65,9 +65,8 @@ func (s *chainSyncServiceServer) FetchBlock( for _, blockRef := range ref { blockIdx := blockRef.GetIndex() blockHash := blockRef.GetHash() - hash, _ := hex.DecodeString(string(blockHash)) slot := uint64(blockIdx) - point := ocommon.NewPoint(slot, hash) + point := ocommon.NewPoint(slot, blockHash) points = append(points, point) } } else { @@ -133,9 +132,8 @@ func (s *chainSyncServiceServer) DumpHistory( blockRef := startToken blockIdx := blockRef.GetIndex() blockHash := blockRef.GetHash() - hash, _ := hex.DecodeString(string(blockHash)) slot := uint64(blockIdx) - startPoint = ocommon.NewPoint(slot, hash) + startPoint = ocommon.NewPoint(slot, blockHash) } else { log.Printf("getting tip\n") tip, err := oConn.ChainSync().Client.GetCurrentTip()