OSDN Git Service

Add the implementation for dppos
[bytom/vapor.git] / protocol / bc / types / dpos.go
index 9646db9..73a600d 100644 (file)
@@ -4,15 +4,6 @@ import (
        "github.com/vapor/protocol/bc"
 )
 
-/*
-const (
-       LoginCandidate DposType = iota
-       LogoutCandidate
-       Delegate
-       UnDelegate
-)
-*/
-
 type DposTx struct {
        SpendCommitmentSuffix []byte
        Type                  TxType
@@ -20,21 +11,14 @@ type DposTx struct {
        To                    string
        Amount                uint64
        Stake                 uint64
-       PaymentAmount         uint64
        Arguments             [][]byte
        Info                  string
        SpendCommitment
 }
 
-func NewDpos(arguments [][]byte, from, to string, sourceID bc.Hash, assetID bc.AssetID, stake, amount, sourcePos uint64, controlProgram []byte, t TxType) *TxInput {
+func NewDpos(arguments [][]byte, from, to string, sourceID bc.Hash, assetID bc.AssetID, stake, amount, sourcePos uint64, controlProgram []byte, t TxType, height uint64) *TxInput {
        var vote string
-       switch t {
-       case LoginCandidate:
-       case LogoutCandidate:
-       case Delegate:
-               vote = "vapor:1:event:vote"
-       case UnDelegate:
-       }
+
        sc := SpendCommitment{
                AssetAmount: bc.AssetAmount{
                        AssetId: &assetID,