Remove unnecessary data from bitcoin.Tx struct

This commit is contained in:
Martin Boehm 2018-03-02 16:07:45 +01:00
parent a04fd8642e
commit a165d71597
2 changed files with 10 additions and 10 deletions

View File

@ -88,15 +88,15 @@ func (p *BitcoinBlockParser) ParseBlock(b []byte) (*Block, error) {
}
}
txs[ti] = Tx{
Txid: t.TxHash().String(),
Version: t.Version,
Txid: t.TxHash().String(),
// skip: Version,
LockTime: t.LockTime,
Vin: vin,
Vout: vout,
// missing: BlockHash,
// missing: Confirmations,
// missing: Time,
// missing: Blocktime,
// skip: BlockHash,
// skip: Confirmations,
// skip: Time,
// skip: Blocktime,
}
}

View File

@ -6,7 +6,7 @@ import (
)
type ScriptSig struct {
Asm string `json:"asm"`
// Asm string `json:"asm"`
Hex string `json:"hex"`
}
@ -47,9 +47,9 @@ func AddressToOutputScript(address string) ([]byte, error) {
// Tx is blockchain transaction
// unnecessary fields are commented out to avoid overhead
type Tx struct {
Hex string `json:"hex"`
Txid string `json:"txid"`
Version int32 `json:"version"`
Hex string `json:"hex"`
Txid string `json:"txid"`
// Version int32 `json:"version"`
LockTime uint32 `json:"locktime"`
Vin []Vin `json:"vin"`
Vout []Vout `json:"vout"`