Skip to content

Commit

Permalink
fix: minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Apr 27, 2020
1 parent ee22926 commit 8b63024
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/cosmic-swingset/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func NewAgoricApp(
distr.NewAppModule(appCodec, app.distrKeeper, app.accountKeeper, app.bankKeeper, app.stakingKeeper),
staking.NewAppModule(appCodec, app.stakingKeeper, app.accountKeeper, app.bankKeeper),
upgrade.NewAppModule(app.upgradeKeeper),
evidence.NewAppModule(app.evidenceKeeper),
evidence.NewAppModule(appCodec, app.evidenceKeeper),
ibc.NewAppModule(app.ibcKeeper),
params.NewAppModule(app.paramsKeeper),
transferModule,
Expand Down
9 changes: 7 additions & 2 deletions packages/cosmic-swingset/bin/ag-nchainz
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
set -e
progname=$(basename -- "$0")

trap 'kill $(jobs -p) 2>/dev/null' EXIT

BASE_PORT=8000
NUM_SOLOS=1

Expand Down Expand Up @@ -59,9 +61,10 @@ testnet)
ag-solo 1000uag
done
# $thisdir/../../deployment/set-json.js $n0d/config/genesis.json --agoric-genesis-overrides
for node in `ls -d $chainid/n[1-9]* 2>/dev/null`; do
for node in `ls -d $chainid/n[1-9]* 2>/dev/null || :`; do
cp $n0d/config/genesis.json $node/$DAEMON/config/genesis.json
done
exit 0
;;
start-daemon)
BASEDIR=$1
Expand All @@ -73,6 +76,7 @@ start-daemon)
done
echo "Starting BOOT_ADDRESS=$ba $DAEMON ${1+"$@"}"
DEBUG=agoric ROLE=two_chain BOOT_ADDRESS=$ba $DAEMON ${1+"$@"}
exit 0
;;

start-solos)
Expand Down Expand Up @@ -100,8 +104,9 @@ start-solos)
) >>nchainz/logs/$log 2>&1 &
done
sleep 2
echo "Waiting for all solos (Hit Control-C to exit)..."
echo "Waiting for all ${1+"$@ "}solos (Hit Control-C to exit)..."
wait
exit 0
;;
*)
echo 1>&2 "$progname: unrecognized command \`$COMMAND'"
Expand Down
4 changes: 2 additions & 2 deletions packages/cosmic-swingset/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
github.com/99designs/keyring v1.1.4 // indirect
github.com/Agoric/agoric-sdk v0.0.0-00010101000000-000000000000 // indirect
github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d // indirect
github.com/cosmos/cosmos-sdk v0.34.4-0.20200422222342-f6e9ee762358
github.com/gibson042/canonicaljson-go v1.0.3 // indirect
github.com/cosmos/cosmos-sdk v0.34.4-0.20200423194215-1cd1d088df05
github.com/gibson042/canonicaljson-go v1.0.3 // indirect
github.com/golang/mock v1.4.3 // indirect
github.com/gorilla/handlers v1.4.2 // indirect
github.com/gorilla/mux v1.7.4
Expand Down
2 changes: 2 additions & 0 deletions packages/cosmic-swingset/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ github.com/cosmos/cosmos-sdk v0.34.4-0.20200417201027-11528d39594c h1:Yd7DVqfImC
github.com/cosmos/cosmos-sdk v0.34.4-0.20200417201027-11528d39594c/go.mod h1:jngw1LJfwEAU+xc/tZwUGIXBAJHapckYGtXycsq8D+U=
github.com/cosmos/cosmos-sdk v0.34.4-0.20200422222342-f6e9ee762358 h1:ZsII2yECeLh2jWqFz3bK8JInzzlHPhgB0ob2c9XMyz4=
github.com/cosmos/cosmos-sdk v0.34.4-0.20200422222342-f6e9ee762358/go.mod h1:Kcgs8c2WWtO2Q+KmDogvGRw+sdEqpvHYXFhj/QiAoOg=
github.com/cosmos/cosmos-sdk v0.34.4-0.20200423194215-1cd1d088df05 h1:jaV9iTBaiYmNAMaDEhvWukIQWQ/NfBoHbgSqPgdKFmM=
github.com/cosmos/cosmos-sdk v0.34.4-0.20200423194215-1cd1d088df05/go.mod h1:Kcgs8c2WWtO2Q+KmDogvGRw+sdEqpvHYXFhj/QiAoOg=
github.com/cosmos/cosmos-sdk v0.38.3 h1:qIBTiw+2T9POaSUJ5rvbBbXeq8C8btBlJxnSegPBd3Y=
github.com/cosmos/cosmos-sdk v0.38.3/go.mod h1:rzWOofbKfRt3wxiylmYWEFHnxxGj0coyqgWl2I9obAw=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU=
Expand Down
2 changes: 1 addition & 1 deletion packages/cosmic-swingset/x/swingset/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (ch channelHandler) Receive(ctx *ControllerContext, str string) (ret string
}

case "bindPort":
err = ctx.Keeper.BindPort(ctx.Context, msg.PortID, ch.ibcModule)
err = ctx.Keeper.BindPort(ctx.Context, msg.PortID)
if err == nil {
ret = "true"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error {

// BindPort defines a wrapper function for the port Keeper's function in
// order to expose it to the SwingSet IBC handler.
// It also registers a route to the port.
func (k Keeper) BindPort(ctx sdk.Context, portID string, mod porttypes.IBCModule) error {
func (k Keeper) BindPort(ctx sdk.Context, portID string) error {
cap := k.portKeeper.BindPort(ctx, portID)
return k.ClaimCapability(ctx, cap, porttypes.PortPath(portID))
}
Expand Down

0 comments on commit 8b63024

Please sign in to comment.