mirror of https://github.com/certusone/wasmd.git
Update Dockerfile
This commit is contained in:
parent
7d92b4bc13
commit
0b93b3b6f5
|
@ -15,8 +15,8 @@ WORKDIR /code
|
|||
COPY . /code/
|
||||
|
||||
# See https://github.com/CosmWasm/wasmvm/releases
|
||||
ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.15.1/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
|
||||
RUN sha256sum /lib/libwasmvm_muslc.a | grep 379c61d2e53f87f63639eaa8ba8bbe687e5833158bb10e0dc0523c3377248d01
|
||||
ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.16.0-rc2/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
|
||||
RUN sha256sum /lib/libwasmvm_muslc.a | grep a8413cde1770c9124572214b3a6bb30a8912253c5f522352e878a8dfb2e6e940
|
||||
|
||||
# force it to use static lib (from above) not standard libgo_cosmwasm.so file
|
||||
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc make build
|
||||
|
|
|
@ -159,25 +159,9 @@ func (p *player) Execute(code wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmt
|
|||
}, 0, nil
|
||||
}
|
||||
|
||||
func getOpenChannel(msg wasmvmtypes.IBCChannelOpenMsg) wasmvmtypes.IBCChannel {
|
||||
if msg.OpenTry != nil {
|
||||
return msg.OpenTry.Channel
|
||||
} else {
|
||||
return msg.OpenInit.Channel
|
||||
}
|
||||
}
|
||||
|
||||
func getConnectChannel(msg wasmvmtypes.IBCChannelConnectMsg) wasmvmtypes.IBCChannel {
|
||||
if msg.OpenAck != nil {
|
||||
return msg.OpenAck.Channel
|
||||
} else {
|
||||
return msg.OpenConfirm.Channel
|
||||
}
|
||||
}
|
||||
|
||||
// OnIBCChannelOpen ensures to accept only configured version
|
||||
func (p player) IBCChannelOpen(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (uint64, error) {
|
||||
if getOpenChannel(msg).Version != p.actor {
|
||||
if msg.GetChannel().Version != p.actor {
|
||||
return 0, nil
|
||||
}
|
||||
return 0, nil
|
||||
|
@ -185,7 +169,7 @@ func (p player) IBCChannelOpen(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg
|
|||
|
||||
// OnIBCChannelConnect persists connection endpoints
|
||||
func (p player) IBCChannelConnect(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) {
|
||||
p.storeEndpoint(store, getConnectChannel(msg))
|
||||
p.storeEndpoint(store, msg.GetChannel())
|
||||
return &wasmvmtypes.IBCBasicResponse{}, 0, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue