Merge pull request #75 from wlc-/patch-2

Add omitted txid to inputs in socketio interface
This commit is contained in:
Martin 2018-10-11 00:26:03 +02:00 committed by GitHub
commit 5855f812b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,6 +240,7 @@ type addressHistoryIndexes struct {
}
type txInputs struct {
Txid *string `json:"txid"`
OutputIndex int `json:"outputIndex"`
Script *string `json:"script"`
// ScriptAsm *string `json:"scriptAsm"`
@ -301,8 +302,10 @@ func txToResTx(tx *api.Tx) resTx {
inputs := make([]txInputs, len(tx.Vin))
for i := range tx.Vin {
vin := &tx.Vin[i]
txid := vin.Txid
script := vin.ScriptSig.Hex
input := txInputs{
Txid: &txid,
Script: &script,
Sequence: int64(vin.Sequence),
OutputIndex: int(vin.Vout),