From 225f0e7dbeb80759f594a1828da1fb46d5681633 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Tue, 8 Aug 2017 12:20:21 +0200 Subject: [PATCH] Rename function --- client/commands/query/get.go | 5 ++--- client/commands/query/query_test.go | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/commands/query/get.go b/client/commands/query/get.go index 46b6c64c5a76..aa0f15f8925b 100644 --- a/client/commands/query/get.go +++ b/client/commands/query/get.go @@ -70,11 +70,10 @@ func GetWithProof(key []byte) (data.Bytes, uint64, if err != nil { return nil, 0, nil, nil, err } - return CustomGetWithProof(key, node, cert) + return getWithProof(key, node, cert) } -// TODO: fix this up alexis -func CustomGetWithProof(key []byte, node client.Client, cert Certifier) (data.Bytes, uint64, +func getWithProof(key []byte, node client.Client, cert Certifier) (data.Bytes, uint64, *iavl.KeyExistsProof, *iavl.KeyNotExistsProof, error) { resp, err := node.ABCIQuery("/key", key, true) diff --git a/client/commands/query/query_test.go b/client/commands/query/query_test.go index 07c571632696..ecf1e5cef2be 100644 --- a/client/commands/query/query_test.go +++ b/client/commands/query/query_test.go @@ -65,7 +65,7 @@ func TestAppProofs(t *testing.T) { // Test existing key. - bs, _, proofExists, _, err := CustomGetWithProof(k, cl, cert) + bs, _, proofExists, _, err := getWithProof(k, cl, cert) require.Nil(err, "%+v", err) require.NotNil(proofExists) @@ -77,7 +77,7 @@ func TestAppProofs(t *testing.T) { // Test non-existing key. missing := []byte("my-missing-key") - bs, _, proofExists, proofNotExists, err := CustomGetWithProof(missing, cl, cert) + bs, _, proofExists, proofNotExists, err := getWithProof(missing, cl, cert) require.Nil(err, "%+v", err) require.Nil(bs) require.Nil(proofExists)