From: HAOYUatHZ Date: Tue, 21 May 2019 09:01:31 +0000 (+0800) Subject: refactor: add lines X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=94bc18e8518e42fca66ec61e9829f59e04d6d2ec;p=bytom%2Fvapor.git refactor: add lines --- diff --git a/blockchain/txfeed/txfeed.go b/blockchain/txfeed/txfeed.go index 926a8192..b6a4c2ed 100644 --- a/blockchain/txfeed/txfeed.go +++ b/blockchain/txfeed/txfeed.go @@ -353,6 +353,7 @@ func buildAnnotatedInput(tx *types.Tx, i uint32) *query.AnnotatedInput { in.Type = "spend" in.ControlProgram = orig.ControlProgram() in.SpentOutputID = e.SpentOutputId + case *bc.CrossChainInput: in.Type = "cross_chain_in" in.ControlProgram = orig.ControlProgram() diff --git a/protocol/validation/vmcontext.go b/protocol/validation/vmcontext.go index 610a8eb7..37cbd5cc 100644 --- a/protocol/validation/vmcontext.go +++ b/protocol/validation/vmcontext.go @@ -34,6 +34,7 @@ func NewTxVMContext(vs *validationState, entry bc.Entry, prog *bc.Program, args destPos = &e.WitnessDestination.Position s := e.SpentOutputId.Bytes() spentOutputID = &s + case *bc.VoteOutput: a1 := spentOutput.Source.Value.AssetId.Bytes() assetID = &a1 diff --git a/wallet/annotated.go b/wallet/annotated.go index 2e7dfeb5..8d9650f7 100644 --- a/wallet/annotated.go +++ b/wallet/annotated.go @@ -190,6 +190,7 @@ func (w *Wallet) BuildAnnotatedInput(tx *types.Tx, i uint32) *query.AnnotatedInp for _, arg := range arguments { in.WitnessArguments = append(in.WitnessArguments, arg) } + case *bc.Spend: in.Type = "spend" in.ControlProgram = orig.ControlProgram() @@ -199,6 +200,7 @@ func (w *Wallet) BuildAnnotatedInput(tx *types.Tx, i uint32) *query.AnnotatedInp for _, arg := range arguments { in.WitnessArguments = append(in.WitnessArguments, arg) } + case *bc.Coinbase: in.Type = "coinbase" in.Arbitrary = e.Arbitrary