X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=account%2Fbuilder.go;h=5f2448a79eb71af2dfd7e6c14028a74f32af44c7;hp=fe96d747bfe086fe001722829ac6105d5adfc543;hb=f578f565b46c85e08256c089a9068ee390105048;hpb=91641ae15f80f23c21745bbdf9357e7124803eee diff --git a/account/builder.go b/account/builder.go index fe96d747..5f2448a7 100644 --- a/account/builder.go +++ b/account/builder.go @@ -386,13 +386,13 @@ func (m *Manager) insertControlProgramDelayed(b *txbuilder.TemplateBuilder, acp }) } -//DecodeUnvoteAction unmarshal JSON-encoded data of spend action -func (m *Manager) DecodeUnvoteAction(data []byte) (txbuilder.Action, error) { - a := &unvoteAction{accounts: m} +//DecodeVetoAction unmarshal JSON-encoded data of spend action +func (m *Manager) DecodeVetoAction(data []byte) (txbuilder.Action, error) { + a := &vetoAction{accounts: m} return a, stdjson.Unmarshal(data, a) } -type unvoteAction struct { +type vetoAction struct { accounts *Manager bc.AssetAmount AccountID string `json:"account_id"` @@ -400,11 +400,11 @@ type unvoteAction struct { UseUnconfirmed bool `json:"use_unconfirmed"` } -func (a *unvoteAction) ActionType() string { - return "unvote" +func (a *vetoAction) ActionType() string { + return "veto" } -func (a *unvoteAction) Build(ctx context.Context, b *txbuilder.TemplateBuilder) error { +func (a *vetoAction) Build(ctx context.Context, b *txbuilder.TemplateBuilder) error { var missing []string if a.AccountID == "" { missing = append(missing, "account_id")