Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
olomix committed May 4, 2022
1 parent b498c07 commit 5a1fd25
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions tests/integration/main_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package integration

import (
"bytes"
"context"
"encoding/json"
"errors"
"io"
"math/big"
"net/http"
"os"
"testing"

Expand Down Expand Up @@ -239,25 +235,6 @@ func buildTree(t testing.TB, revNonces []uint64) *merkletree.MerkleTree {
return mt
}

func submitNodesToRHS(t testing.TB, url string, req []proof.Node) {
reqBytes, err := json.Marshal(req)
require.NoError(t, err)
bodyReader := bytes.NewReader(reqBytes)
httpReq, err := http.NewRequest(http.MethodPost, url+"/node", bodyReader)
require.NoError(t, err)

httpResp, err := http.DefaultClient.Do(httpReq)
require.NoError(t, err)
defer func() {
require.NoError(t, httpResp.Body.Close())
}()
respData, err := io.ReadAll(httpResp.Body)
require.NoError(t, err)

require.Equal(t, http.StatusOK, httpResp.StatusCode, string(respData))
require.Equal(t, `{"status":"OK"}`, string(respData))
}

func saveTreeToRHS(t testing.TB, rhsCli *proof.HTTPReverseHashCli,
merkleTree *merkletree.MerkleTree) {
ctx := context.Background()
Expand Down

0 comments on commit 5a1fd25

Please sign in to comment.