OSDN Git Service

Add the basic framework for voting processing for dpos
[bytom/vapor.git] / api / dpos_vote.go
index 4374112..a7333ee 100644 (file)
@@ -13,7 +13,18 @@ import (
        "github.com/vapor/protocol/bc"
 )
 
+func (a *API) registe(ctx context.Context, ins struct {
+       DelegateAddress string `json:"delegate_address"`
+       DelegateName    string `json:"delegate_name"`
+}) Response {
+
+       
+
+       return NewSuccessResponse("")
+}
+
 func (a *API) dpos(ctx context.Context, ins struct {
+       From   string `json:"from"`
        To     string `json:"to"`
        Fee    uint64 `json:"fee"`
        Stake  uint64 `json:"stake"`
@@ -25,7 +36,7 @@ func (a *API) dpos(ctx context.Context, ins struct {
        // 生成dpos交易
        dpos := account.DopsAction{
                Accounts: a.wallet.AccountMgr,
-               From:     config.CommonConfig.Consensus.Dpos.Coinbase,
+               From:     ins.From,
                To:       ins.To,
                Fee:      ins.Fee,
                TxType:   ins.TxType,