Remove unnecessary data from bitcoin.Tx struct
This commit is contained in:
parent
a04fd8642e
commit
a165d71597
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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"`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user