Fee handler set by default, tested app level

This commit is contained in:
Ethan Frey
2017-07-12 20:38:54 +02:00
parent 454227393b
commit 36a453ea41
7 changed files with 47 additions and 12 deletions
+4
View File
@@ -11,6 +11,10 @@ import (
// NameFee - namespace for the fee module
const NameFee = "fee"
// Bank is a default location for the fees, but pass anything into
// the middleware constructor
var Bank = basecoin.Actor{App: NameFee, Address: []byte("bank")}
// SimpleFeeMiddleware - middleware for fee checking, constant amount
// It used modules.coin to move the money
type SimpleFeeMiddleware struct {
+1 -1
View File
@@ -29,7 +29,7 @@ func TestFeeChecks(t *testing.T) {
pure := atoms(46657)
// these are some accounts
collector := basecoin.Actor{App: fee.NameFee, Address: []byte("bank")}
collector := basecoin.Actor{App: fee.NameFee, Address: []byte("mine")}
key1 := coin.NewAccountWithKey(mixed)
key2 := coin.NewAccountWithKey(pure)
act1, act2 := key1.Actor(), key2.Actor()