diff --git a/app/ante.go b/app/ante.go index 4651496..aeb302f 100644 --- a/app/ante.go +++ b/app/ante.go @@ -27,23 +27,9 @@ func consumeSigGas( case multisig.PubKeyMultisigThreshold: var multisignature multisig.Multisignature codec.Cdc.MustUnmarshalBinaryBare(sig, &multisignature) - ConsumeMultisignatureVerificationGas(meter, multisignature, pubkey, params) + ante.ConsumeMultisignatureVerificationGas(meter, multisignature, pubkey, params) return nil default: return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "unrecognized public key type: %T", pubkey) } } - -// Copied from sdk ante package as it wasn't exposed there -func ConsumeMultisignatureVerificationGas(meter sdk.GasMeter, - sig multisig.Multisignature, pubkey multisig.PubKeyMultisigThreshold, - params types.Params) { - size := sig.BitArray.Size() - sigIndex := 0 - for i := 0; i < size; i++ { - if sig.BitArray.GetIndex(i) { - ante.DefaultSigVerificationGasConsumer(meter, sig.Sigs[sigIndex], pubkey.PubKeys[i], params) - sigIndex++ - } - } -} diff --git a/app/app_test.go b/app/app_test.go index 7d79c10..c0256fa 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -16,11 +16,11 @@ import ( func TestExport(t *testing.T) { db := db.NewMemDB() - app := NewStraightedgeApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0, wasm.DisableAllProposals, nil) + app := NewStraightedgeApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0, wasm.EnableAllProposals, nil) setGenesis(app) // Making a new app object with the db, so that initchain hasn't been called - newApp := NewStraightedgeApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0, wasm.DisableAllProposals, nil) + newApp := NewStraightedgeApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0, wasm.EnableAllProposals, nil) _, _, err := newApp.ExportAppStateAndValidators(false, []string{}) require.NoError(t, err, "ExportAppStateAndValidators should not have an error") } @@ -28,7 +28,7 @@ func TestExport(t *testing.T) { // ensure that black listed addresses are properly set in bank keeper func TestBlackListedAddrs(t *testing.T) { db := db.NewMemDB() - app := NewStraightedgeApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0, wasm.DisableAllProposals, nil) + app := NewStraightedgeApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, 0, wasm.EnableAllProposals, nil) for acc := range maccPerms { require.True(t, app.bankKeeper.BlacklistedAddr(app.supplyKeeper.GetModuleAddress(acc))) diff --git a/cmd/strd/main.go b/cmd/strd/main.go index 439c36b..c4579fc 100644 --- a/cmd/strd/main.go +++ b/cmd/strd/main.go @@ -99,7 +99,7 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer) abci.Application } return app.NewStraightedgeApp(logger, db, traceStore, true, invCheckPeriod, - wasm.DisableAllProposals, + wasm.EnableAllProposals, skipUpgradeHeights, baseapp.SetPruning(pruningOpts), baseapp.SetMinGasPrices(viper.GetString(server.FlagMinGasPrices)), @@ -113,13 +113,13 @@ func exportAppStateAndTMValidators( ) (json.RawMessage, []tmtypes.GenesisValidator, error) { if height != -1 { - tempApp := app.NewStraightedgeApp(logger, db, traceStore, false, uint(1), wasm.DisableAllProposals, nil) + tempApp := app.NewStraightedgeApp(logger, db, traceStore, false, uint(1), wasm.EnableAllProposals, nil) err := tempApp.LoadHeight(height) if err != nil { return nil, nil, err } return tempApp.ExportAppStateAndValidators(forZeroHeight, jailWhiteList) } - tempApp := app.NewStraightedgeApp(logger, db, traceStore, true, uint(1), wasm.DisableAllProposals, nil) + tempApp := app.NewStraightedgeApp(logger, db, traceStore, true, uint(1), wasm.EnableAllProposals, nil) return tempApp.ExportAppStateAndValidators(forZeroHeight, jailWhiteList) }