From 72770bea66b2c0c3181c9f81770dc0573adfeda7 Mon Sep 17 00:00:00 2001 From: Xiang Liu Date: Mon, 4 Mar 2024 10:38:41 -0500 Subject: [PATCH 1/3] Add debug message --- client/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/client.go b/client/client.go index 3477acb..4d9a75b 100644 --- a/client/client.go +++ b/client/client.go @@ -222,6 +222,9 @@ func (ec *SDKClient) Status(ctx context.Context) ( return nil, -1, nil, nil, err } + log.Printf("header string from node: ", header.Hash()) + log.Printf("hash returned : ", header.Hash().Hex()) + // Get sync status var syncStatus *RosettaTypes.SyncStatus if ec.rosettaConfig.SupportsSyncing { From 26cba347a82ea83b13b9a5211dcd5a104986e914 Mon Sep 17 00:00:00 2001 From: Xiang Liu Date: Mon, 4 Mar 2024 11:14:47 -0500 Subject: [PATCH 2/3] print ln --- client/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/client.go b/client/client.go index 4d9a75b..13c7d27 100644 --- a/client/client.go +++ b/client/client.go @@ -222,8 +222,8 @@ func (ec *SDKClient) Status(ctx context.Context) ( return nil, -1, nil, nil, err } - log.Printf("header string from node: ", header.Hash()) - log.Printf("hash returned : ", header.Hash().Hex()) + fmt.Printf("header string from node: %s\n", header.Hash()) + fmt.Printf("hash returned : %s\n", header.Hash().Hex()) // Get sync status var syncStatus *RosettaTypes.SyncStatus From 4ec43f1fbf4e51f0bd98c38c96d3fc3521eab5ee Mon Sep 17 00:00:00 2001 From: Xiang Liu Date: Mon, 4 Mar 2024 11:42:17 -0500 Subject: [PATCH 3/3] Don't use block hash --- services/block_service.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/block_service.go b/services/block_service.go index fc8f4d1..99d0638 100644 --- a/services/block_service.go +++ b/services/block_service.go @@ -177,9 +177,9 @@ func (s *BlockAPIService) GetEthBlock( blockIdentifier *RosettaTypes.PartialBlockIdentifier, ) (*EthTypes.Block, []*client.LoadedTransaction, *client.RPCBlock, error) { if blockIdentifier != nil { - if blockIdentifier.Hash != nil { - return s.GetBlock(ctx, "eth_getBlockByHash", *blockIdentifier.Hash, true) - } + //if blockIdentifier.Hash != nil { + // return s.GetBlock(ctx, "eth_getBlockByHash", *blockIdentifier.Hash, true) + //} if blockIdentifier.Index != nil { return s.GetBlock(ctx, "eth_getBlockByNumber", client.ToBlockNumArg(big.NewInt(*blockIdentifier.Index)), true)