OSDN Git Service

extend utxo struct && testcase with state data (#1848)
[bytom/bytom.git] / protocol / bc / types / vote_output.go
index 0fe87eb..678d2f4 100644 (file)
@@ -14,7 +14,7 @@ type VoteOutput struct {
 }
 
 // NewVoteOutput create a new output struct
-func NewVoteOutput(assetID bc.AssetID, amount uint64, controlProgram []byte, vote []byte) *TxOutput {
+func NewVoteOutput(assetID bc.AssetID, amount uint64, controlProgram []byte, vote []byte, state []byte) *TxOutput {
        return &TxOutput{
                AssetVersion: 1,
                OutputCommitment: OutputCommitment{
@@ -24,6 +24,7 @@ func NewVoteOutput(assetID bc.AssetID, amount uint64, controlProgram []byte, vot
                        },
                        VMVersion:      1,
                        ControlProgram: controlProgram,
+                       StateData:      state,
                },
                TypedOutput: &VoteOutput{Vote: vote},
        }