s/adam/basecoin/g; fix tests
This commit is contained in:
@@ -21,21 +21,18 @@ type CounterTx struct {
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
type CounterPlugin struct {
|
||||
name string
|
||||
}
|
||||
|
||||
func (cp *CounterPlugin) Name() string {
|
||||
return cp.name
|
||||
return "counter"
|
||||
}
|
||||
|
||||
func (cp *CounterPlugin) StateKey() []byte {
|
||||
return []byte(fmt.Sprintf("CounterPlugin{name=%v}.State", cp.name))
|
||||
return []byte(fmt.Sprintf("CounterPlugin.State"))
|
||||
}
|
||||
|
||||
func New() *CounterPlugin {
|
||||
return &CounterPlugin{
|
||||
name: "counter",
|
||||
}
|
||||
return &CounterPlugin{}
|
||||
}
|
||||
|
||||
func (cp *CounterPlugin) SetOption(store types.KVStore, key string, value string) (log string) {
|
||||
|
||||
@@ -22,8 +22,7 @@ func TestCounterPlugin(t *testing.T) {
|
||||
t.Log(bcApp.Info())
|
||||
|
||||
// Add Counter plugin
|
||||
counterPluginName := "testcounter"
|
||||
counterPlugin := New(counterPluginName)
|
||||
counterPlugin := New()
|
||||
bcApp.RegisterPlugin(counterPlugin)
|
||||
|
||||
// Account initialization
|
||||
@@ -40,7 +39,7 @@ func TestCounterPlugin(t *testing.T) {
|
||||
tx := &types.AppTx{
|
||||
Gas: gas,
|
||||
Fee: fee,
|
||||
Name: counterPluginName,
|
||||
Name: "counter",
|
||||
Input: types.NewTxInput(test1Acc.PubKey, inputCoins, inputSequence),
|
||||
Data: wire.BinaryBytes(CounterTx{Valid: true, Fee: appFee}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user