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{ txs[ti] = Tx{
Txid: t.TxHash().String(), Txid: t.TxHash().String(),
Version: t.Version, // skip: Version,
LockTime: t.LockTime, LockTime: t.LockTime,
Vin: vin, Vin: vin,
Vout: vout, Vout: vout,
// missing: BlockHash, // skip: BlockHash,
// missing: Confirmations, // skip: Confirmations,
// missing: Time, // skip: Time,
// missing: Blocktime, // skip: Blocktime,
} }
} }

View File

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