OSDN Git Service

refactor: add lines
authorHAOYUatHZ <haoyu@protonmail.com>
Tue, 21 May 2019 09:01:31 +0000 (17:01 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Tue, 21 May 2019 09:01:31 +0000 (17:01 +0800)
blockchain/txfeed/txfeed.go
protocol/validation/vmcontext.go
wallet/annotated.go

index 926a819..b6a4c2e 100644 (file)
@@ -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()
index 610a8eb..37cbd5c 100644 (file)
@@ -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
index 2e7dfeb..8d9650f 100644 (file)
@@ -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