Switch to BurnFeeHandler
This commit is contained in:
parent
3bbb15f454
commit
474fa1dfd1
|
@ -73,7 +73,7 @@ func NewBasecoinApp(logger log.Logger, db dbm.DB) *BasecoinApp {
|
|||
AddRoute("simplestake", simplestake.NewHandler(stakeKeeper))
|
||||
|
||||
// Define the feeHandler.
|
||||
app.feeHandler = func(ctx sdk.Context, tx sdk.Tx, fees sdk.Coins) {}
|
||||
app.feeHandler = auth.BurnFeeHandler
|
||||
|
||||
// Initialize BaseApp.
|
||||
app.SetTxDecoder(app.txDecoder)
|
||||
|
|
|
@ -83,7 +83,7 @@ func NewDemocoinApp(logger log.Logger, db dbm.DB) *DemocoinApp {
|
|||
AddRoute("simplestake", simplestake.NewHandler(stakeKeeper))
|
||||
|
||||
// Define the feeHandler.
|
||||
app.feeHandler = func(ctx sdk.Context, tx sdk.Tx, fee sdk.Coins) {}
|
||||
app.feeHandler = auth.BurnFeeHandler
|
||||
|
||||
// Initialize BaseApp.
|
||||
app.SetTxDecoder(app.txDecoder)
|
||||
|
|
|
@ -157,3 +157,7 @@ func deductFees(acc sdk.Account, fee sdk.StdFee) (sdk.Account, sdk.Result) {
|
|||
acc.SetCoins(newCoins)
|
||||
return acc, sdk.Result{}
|
||||
}
|
||||
|
||||
// BurnFeeHandler burns all fees (decreasing total supply)
|
||||
func BurnFeeHandler(ctx sdk.Context, tx sdk.Tx, fee sdk.Coins) {
|
||||
}
|
||||
|
|
|
@ -12,9 +12,6 @@ import (
|
|||
wire "github.com/cosmos/cosmos-sdk/wire"
|
||||
)
|
||||
|
||||
func nopFeeHandler(ctx sdk.Context, tx sdk.Tx, fee sdk.Coins) {
|
||||
}
|
||||
|
||||
func newTestMsg(addrs ...sdk.Address) *sdk.TestMsg {
|
||||
return sdk.NewTestMsg(addrs...)
|
||||
}
|
||||
|
@ -75,7 +72,7 @@ func TestAnteHandlerSigErrors(t *testing.T) {
|
|||
cdc := wire.NewCodec()
|
||||
RegisterBaseAccount(cdc)
|
||||
mapper := NewAccountMapper(cdc, capKey, &BaseAccount{})
|
||||
anteHandler := NewAnteHandler(mapper, nopFeeHandler)
|
||||
anteHandler := NewAnteHandler(mapper, BurnFeeHandler)
|
||||
ctx := sdk.NewContext(ms, abci.Header{ChainID: "mychainid"}, false, nil)
|
||||
|
||||
// keys and addresses
|
||||
|
@ -116,7 +113,7 @@ func TestAnteHandlerSequences(t *testing.T) {
|
|||
cdc := wire.NewCodec()
|
||||
RegisterBaseAccount(cdc)
|
||||
mapper := NewAccountMapper(cdc, capKey, &BaseAccount{})
|
||||
anteHandler := NewAnteHandler(mapper, nopFeeHandler)
|
||||
anteHandler := NewAnteHandler(mapper, BurnFeeHandler)
|
||||
ctx := sdk.NewContext(ms, abci.Header{ChainID: "mychainid"}, false, nil)
|
||||
|
||||
// keys and addresses
|
||||
|
@ -182,7 +179,7 @@ func TestAnteHandlerFees(t *testing.T) {
|
|||
cdc := wire.NewCodec()
|
||||
RegisterBaseAccount(cdc)
|
||||
mapper := NewAccountMapper(cdc, capKey, &BaseAccount{})
|
||||
anteHandler := NewAnteHandler(mapper, nopFeeHandler)
|
||||
anteHandler := NewAnteHandler(mapper, BurnFeeHandler)
|
||||
ctx := sdk.NewContext(ms, abci.Header{ChainID: "mychainid"}, false, nil)
|
||||
|
||||
// keys and addresses
|
||||
|
@ -219,7 +216,7 @@ func TestAnteHandlerBadSignBytes(t *testing.T) {
|
|||
cdc := wire.NewCodec()
|
||||
RegisterBaseAccount(cdc)
|
||||
mapper := NewAccountMapper(cdc, capKey, &BaseAccount{})
|
||||
anteHandler := NewAnteHandler(mapper, nopFeeHandler)
|
||||
anteHandler := NewAnteHandler(mapper, BurnFeeHandler)
|
||||
ctx := sdk.NewContext(ms, abci.Header{ChainID: "mychainid"}, false, nil)
|
||||
|
||||
// keys and addresses
|
||||
|
@ -294,7 +291,7 @@ func TestAnteHandlerSetPubKey(t *testing.T) {
|
|||
cdc := wire.NewCodec()
|
||||
RegisterBaseAccount(cdc)
|
||||
mapper := NewAccountMapper(cdc, capKey, &BaseAccount{})
|
||||
anteHandler := NewAnteHandler(mapper, nopFeeHandler)
|
||||
anteHandler := NewAnteHandler(mapper, BurnFeeHandler)
|
||||
ctx := sdk.NewContext(ms, abci.Header{ChainID: "mychainid"}, false, nil)
|
||||
|
||||
// keys and addresses
|
||||
|
|
Loading…
Reference in New Issue