Permalink
Browse files

added Endblocker

  • Loading branch information...
patrickwieth committed Jan 23, 2019
1 parent 829249f commit 4dcea1f99d407e293d7ee5d6bd9c1b23f0e91588
Showing with 18 additions and 2 deletions.
  1. +17 −1 app.go
  2. +1 −1 x/nameservice/keeper.go
18 app.go
@@ -20,7 +20,7 @@ import (
)

const (
appName = "nameservice"
appName = "cardservice"
)

type nameserviceApp struct {
@@ -117,6 +117,11 @@ func NewnameserviceApp(logger log.Logger, db dbm.DB) *nameserviceApp {
app.keyCSinternal,
)



app.SetEndBlocker(app.blaTerror)


err := app.LoadLatestVersion(app.keyMain)
if err != nil {
cmn.Exit(err.Error())
@@ -125,6 +130,17 @@ func NewnameserviceApp(logger log.Logger, db dbm.DB) *nameserviceApp {
return app
}

func (asdf *nameserviceApp) blaTerror(deliverStateContext sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock {
panic(penis)
return abci.ResponseEndBlock{}
}

/*
func (ba *bam.BaseApp) EndTerror(deliverStateContext sdk.Context, req string) sdk.EndBlocker {
return abci.ResponseEndBlock{}
}
*/

// GenesisState represents chain state at the start of the chain. Any initial state (account balances) are stored here.
type GenesisState struct {
Accounts []*auth.BaseAccount `json:"accounts"`
@@ -67,7 +67,7 @@ func (k Keeper) SetOwner(ctx sdk.Context, name string, owner sdk.AccAddress) {
store.Set([]byte(name), owner)
}

// GetPrice - gets the current price of a name. If price doesn't exist yet, set to 1steak.
// GetPrice - gets the current price of a card. If price doesn't exist yet, set to 1steak.
func (k Keeper) GetPrice(ctx sdk.Context, name string) sdk.Coins {
if !k.HasOwner(ctx, name) {
return sdk.Coins{sdk.NewInt64Coin("mycoin", 1)}

0 comments on commit 4dcea1f

Please sign in to comment.