Merge pull request #75 from wlc-/patch-2
Add omitted txid to inputs in socketio interface
This commit is contained in:
commit
5855f812b6
@ -240,6 +240,7 @@ type addressHistoryIndexes struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type txInputs struct {
|
type txInputs struct {
|
||||||
|
Txid *string `json:"txid"`
|
||||||
OutputIndex int `json:"outputIndex"`
|
OutputIndex int `json:"outputIndex"`
|
||||||
Script *string `json:"script"`
|
Script *string `json:"script"`
|
||||||
// ScriptAsm *string `json:"scriptAsm"`
|
// ScriptAsm *string `json:"scriptAsm"`
|
||||||
@ -301,8 +302,10 @@ func txToResTx(tx *api.Tx) resTx {
|
|||||||
inputs := make([]txInputs, len(tx.Vin))
|
inputs := make([]txInputs, len(tx.Vin))
|
||||||
for i := range tx.Vin {
|
for i := range tx.Vin {
|
||||||
vin := &tx.Vin[i]
|
vin := &tx.Vin[i]
|
||||||
|
txid := vin.Txid
|
||||||
script := vin.ScriptSig.Hex
|
script := vin.ScriptSig.Hex
|
||||||
input := txInputs{
|
input := txInputs{
|
||||||
|
Txid: &txid,
|
||||||
Script: &script,
|
Script: &script,
|
||||||
Sequence: int64(vin.Sequence),
|
Sequence: int64(vin.Sequence),
|
||||||
OutputIndex: int(vin.Vout),
|
OutputIndex: int(vin.Vout),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user