From e7616ea9776fb50dc419e02bd1dfe3ff183ecc14 Mon Sep 17 00:00:00 2001 From: fearlessfe <505380967@qq.com> Date: Sat, 19 Oct 2024 10:59:08 +0800 Subject: [PATCH 1/2] fix: rpc method error in state network --- portalnetwork/state/network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portalnetwork/state/network.go b/portalnetwork/state/network.go index ebb8fccd9879..25008d78a1a1 100644 --- a/portalnetwork/state/network.go +++ b/portalnetwork/state/network.go @@ -197,7 +197,7 @@ func (h *StateNetwork) getStateRoot(blockHash common.Bytes32) (common.Bytes32, e arg := hexutil.Encode(contentKey) res := &discover.ContentInfo{} - err := h.client.CallContext(ctx, res, "portal_historyRecursiveFindContent", arg) + err := h.client.CallContext(ctx, res, "portal_historyGetContent", arg) if err != nil { return common.Bytes32{}, err } From 74ea1769dbaec8acc08619e5c4680ba8ef28b628 Mon Sep 17 00:00:00 2001 From: fearlessfe <505380967@qq.com> Date: Sat, 19 Oct 2024 16:11:50 +0800 Subject: [PATCH 2/2] fix: test error --- portalnetwork/state/network_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portalnetwork/state/network_test.go b/portalnetwork/state/network_test.go index 965db5c3fcb7..24504e7f3ba6 100644 --- a/portalnetwork/state/network_test.go +++ b/portalnetwork/state/network_test.go @@ -37,7 +37,7 @@ type MockAPI struct { header string } -func (p *MockAPI) HistoryRecursiveFindContent(contentKeyHex string) (*discover.ContentInfo, error) { +func (p *MockAPI) HistoryGetContent(contentKeyHex string) (*discover.ContentInfo, error) { headerWithProof := &history.BlockHeaderWithProof{ Header: hexutil.MustDecode(p.header), Proof: &history.BlockHeaderProof{