s/adam/basecoin/g; fix tests

This commit is contained in:
Jae Kwon
2017-02-12 19:01:17 -08:00
parent 5cfc96676a
commit b189018090
7 changed files with 28 additions and 63 deletions
+3 -6
View File
@@ -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) {
+2 -3
View File
@@ -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}),
}