OSDN Git Service

remove controlAction#ReferenceData (#536)
authorYongfeng LI <wliyongfeng@gmail.com>
Fri, 6 Apr 2018 02:38:35 +0000 (10:38 +0800)
committerPaladz <yzhu101@uottawa.ca>
Fri, 6 Apr 2018 02:38:35 +0000 (10:38 +0800)
account/builder.go

index 3efa016..e3bd7f7 100755 (executable)
@@ -11,7 +11,6 @@ import (
        "github.com/bytom/common"
        "github.com/bytom/consensus"
        "github.com/bytom/crypto/ed25519/chainkd"
-       chainjson "github.com/bytom/encoding/json"
        "github.com/bytom/errors"
        "github.com/bytom/protocol/bc"
        "github.com/bytom/protocol/bc/types"
@@ -183,16 +182,6 @@ func UtxoToInputs(signer *signers.Signer, u *UTXO) (*types.TxInput, *txbuilder.S
        return txInput, sigInst, nil
 }
 
-//NewControlAction create new control action
-func (m *Manager) NewControlAction(amt bc.AssetAmount, accountID string, refData chainjson.Map) txbuilder.Action {
-       return &controlAction{
-               accounts:      m,
-               AssetAmount:   amt,
-               AccountID:     accountID,
-               ReferenceData: refData,
-       }
-}
-
 //DecodeControlAction unmarshal JSON-encoded data of control action
 func (m *Manager) DecodeControlAction(data []byte) (txbuilder.Action, error) {
        a := &controlAction{accounts: m}
@@ -204,7 +193,6 @@ type controlAction struct {
        accounts *Manager
        bc.AssetAmount
        AccountID     string        `json:"account_id"`
-       ReferenceData chainjson.Map `json:"reference_data"`
 }
 
 func (a *controlAction) Build(ctx context.Context, b *txbuilder.TemplateBuilder) error {