From 1addc4847a0ab37a5eff3942b72490e55f1040d7 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Thu, 23 Jan 2020 16:18:47 -0500 Subject: [PATCH 1/2] remove http request --- x/wasm/internal/types/msg.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/x/wasm/internal/types/msg.go b/x/wasm/internal/types/msg.go index 8803f88b84..d304afec14 100644 --- a/x/wasm/internal/types/msg.go +++ b/x/wasm/internal/types/msg.go @@ -2,7 +2,6 @@ package types import ( "encoding/json" - "net/http" "net/url" "regexp" @@ -50,12 +49,6 @@ func (msg MsgStoreCode) ValidateBasic() sdk.Error { if !u.IsAbs() { return sdk.ErrInternal("source should be an absolute url") } - - // check if the source is reachable - resp, err := http.Get(msg.Source) - if err != nil || resp.StatusCode != 200 { - return sdk.ErrInternal("source url is not reachable") - } } if msg.Builder != "" { From 348a12316b3782249ffa66114d93a6954b3cc568 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Thu, 23 Jan 2020 16:28:29 -0500 Subject: [PATCH 2/2] remove genesis test --- x/wasm/genesis_test.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/x/wasm/genesis_test.go b/x/wasm/genesis_test.go index bd2af27180..622d16f111 100644 --- a/x/wasm/genesis_test.go +++ b/x/wasm/genesis_test.go @@ -52,20 +52,6 @@ func TestInitGenesis(t *testing.T) { res = h(data.ctx, msg) require.False(t, res.IsOK()) - t.Log("fail with unreachable source url") - msg = MsgStoreCode{ - Sender: creator, - WASMByteCode: testContract, - Source: "https://github.com/cosmwasm/wasmddddddrandom", - Builder: "", - } - - sdkerr = msg.ValidateBasic() - require.Error(t, sdkerr) - - res = h(data.ctx, msg) - require.False(t, res.IsOK()) - t.Log("fail with invalid build tag") msg = MsgStoreCode{ Sender: creator,