Return tx heights

This commit is contained in:
Aditya Kulkarni 2019-09-17 13:26:23 -07:00
parent d36126ba9d
commit e723c4e1d8
4 changed files with 84 additions and 65 deletions

View File

@ -212,33 +212,34 @@ func (s *SqlStreamer) GetBlockRange(span *walletrpc.BlockRange, resp walletrpc.C
func (s *SqlStreamer) GetTransaction(ctx context.Context, txf *walletrpc.TxFilter) (*walletrpc.RawTransaction, error) { func (s *SqlStreamer) GetTransaction(ctx context.Context, txf *walletrpc.TxFilter) (*walletrpc.RawTransaction, error) {
var txBytes []byte var txBytes []byte
var txHeight int
var err error var err error
if txf.Hash != nil { if txf.Hash != nil {
leHashString := hex.EncodeToString(txf.Hash) leHashString := hex.EncodeToString(txf.Hash)
txBytes, err = storage.GetTxByHash(ctx, s.db, leHashString) txBytes, txHeight, err = storage.GetTxByHash(ctx, s.db, leHashString)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &walletrpc.RawTransaction{Data: txBytes}, nil return &walletrpc.RawTransaction{Data: txBytes, Height: uint64(txHeight)}, nil
} }
if txf.Block.Hash != nil { if txf.Block.Hash != nil {
leHashString := hex.EncodeToString(txf.Hash) leHashString := hex.EncodeToString(txf.Hash)
txBytes, err = storage.GetTxByHashAndIndex(ctx, s.db, leHashString, int(txf.Index)) txBytes, txHeight, err = storage.GetTxByHashAndIndex(ctx, s.db, leHashString, int(txf.Index))
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &walletrpc.RawTransaction{Data: txBytes}, nil return &walletrpc.RawTransaction{Data: txBytes, Height: uint64(txHeight)}, nil
} }
// A totally unset protobuf will attempt to fetch the genesis coinbase tx. // A totally unset protobuf will attempt to fetch the genesis coinbase tx.
txBytes, err = storage.GetTxByHeightAndIndex(ctx, s.db, int(txf.Block.Height), int(txf.Index)) txBytes, txHeight, err = storage.GetTxByHeightAndIndex(ctx, s.db, int(txf.Block.Height), int(txf.Index))
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &walletrpc.RawTransaction{Data: txBytes}, nil return &walletrpc.RawTransaction{Data: txBytes, Height: uint64(txHeight)}, nil
} }
// GetLightdInfo gets the LightWalletD (this server) info // GetLightdInfo gets the LightWalletD (this server) info

View File

@ -189,34 +189,40 @@ func StoreTransaction(db *sql.DB, blockHeight int, blockHash string, txIndex int
} }
// GetTxByHash retrieves a full transaction by its little-endian hash. // GetTxByHash retrieves a full transaction by its little-endian hash.
func GetTxByHash(ctx context.Context, db *sql.DB, txHash string) ([]byte, error) { func GetTxByHash(ctx context.Context, db *sql.DB, txHash string) ([]byte, int, error) {
var txBytes []byte // avoid a copy with *RawBytes var txBytes []byte // avoid a copy with *RawBytes
query := "SELECT tx_bytes from transactions WHERE tx_hash = ?" var height int
err := db.QueryRowContext(ctx, query, txHash).Scan(&txBytes)
query := "SELECT tx_bytes, block_height from transactions WHERE tx_hash = ?"
err := db.QueryRowContext(ctx, query, txHash).Scan(&txBytes, &height)
if err != nil { if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("getting tx with hash %s", txHash)) return nil, 0, errors.Wrap(err, fmt.Sprintf("getting tx with hash %s", txHash))
} }
return txBytes, nil return txBytes, height, nil
} }
// GetTxByHeightAndIndex retrieves a full transaction by its parent block height and index // GetTxByHeightAndIndex retrieves a full transaction by its parent block height and index
func GetTxByHeightAndIndex(ctx context.Context, db *sql.DB, blockHeight, txIndex int) ([]byte, error) { func GetTxByHeightAndIndex(ctx context.Context, db *sql.DB, blockHeight, txIndex int) ([]byte, int, error) {
var txBytes []byte // avoid a copy with *RawBytes var txBytes []byte // avoid a copy with *RawBytes
query := "SELECT tx_bytes from transactions WHERE (block_height = ? AND tx_index = ?)" var height int
err := db.QueryRowContext(ctx, query, blockHeight, txIndex).Scan(&txBytes)
query := "SELECT tx_bytes, block_height from transactions WHERE (block_height = ? AND tx_index = ?)"
err := db.QueryRowContext(ctx, query, blockHeight, txIndex).Scan(&txBytes, &height)
if err != nil { if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("getting tx (%d, %d)", blockHeight, txIndex)) return nil, 0, errors.Wrap(err, fmt.Sprintf("getting tx (%d, %d)", blockHeight, txIndex))
} }
return txBytes, nil return txBytes, height, nil
} }
// GetTxByHashAndIndex retrieves a full transaction by its parent block hash and index // GetTxByHashAndIndex retrieves a full transaction by its parent block hash and index
func GetTxByHashAndIndex(ctx context.Context, db *sql.DB, blockHash string, txIndex int) ([]byte, error) { func GetTxByHashAndIndex(ctx context.Context, db *sql.DB, blockHash string, txIndex int) ([]byte, int, error) {
var txBytes []byte // avoid a copy with *RawBytes var txBytes []byte // avoid a copy with *RawBytes
query := "SELECT tx_bytes from transactions WHERE (block_hash = ? AND tx_index = ?)" var height int
err := db.QueryRowContext(ctx, query, blockHash, txIndex).Scan(&txBytes)
query := "SELECT tx_bytes, block_height from transactions WHERE (block_hash = ? AND tx_index = ?)"
err := db.QueryRowContext(ctx, query, blockHash, txIndex).Scan(&txBytes, &height)
if err != nil { if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("getting tx (%x, %d)", blockHash, txIndex)) return nil, 0, errors.Wrap(err, fmt.Sprintf("getting tx (%x, %d)", blockHash, txIndex))
} }
return txBytes, nil return txBytes, height, nil
} }

View File

@ -180,9 +180,11 @@ func (m *TxFilter) GetHash() []byte {
return nil return nil
} }
// RawTransaction contains the complete transaction data. // RawTransaction contains the complete transaction data. It also optionally includes
// the block height in which the transaction was included
type RawTransaction struct { type RawTransaction struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
@ -220,6 +222,13 @@ func (m *RawTransaction) GetData() []byte {
return nil return nil
} }
func (m *RawTransaction) GetHeight() uint64 {
if m != nil {
return m.Height
}
return 0
}
type SendResponse struct { type SendResponse struct {
ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"` ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"`
ErrorMessage string `protobuf:"bytes,2,opt,name=errorMessage,proto3" json:"errorMessage,omitempty"` ErrorMessage string `protobuf:"bytes,2,opt,name=errorMessage,proto3" json:"errorMessage,omitempty"`
@ -567,48 +576,49 @@ func init() {
func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) } func init() { proto.RegisterFile("service.proto", fileDescriptor_a0b84a42fa06f626) }
var fileDescriptor_a0b84a42fa06f626 = []byte{ var fileDescriptor_a0b84a42fa06f626 = []byte{
// 654 bytes of a gzipped FileDescriptorProto // 662 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xdf, 0x4f, 0x13, 0x41, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x41, 0x6f, 0x13, 0x3d,
0x10, 0x6e, 0xa5, 0x07, 0x74, 0x5a, 0x20, 0x6e, 0xc4, 0x34, 0x15, 0xb5, 0xae, 0x9a, 0xe0, 0xcb, 0x10, 0x4d, 0xda, 0x6c, 0xdb, 0x4c, 0xd2, 0x56, 0x9f, 0xf5, 0x15, 0x45, 0xa1, 0x40, 0x30, 0x42,
0x85, 0x20, 0xc6, 0x67, 0xa9, 0x4a, 0x48, 0x30, 0xd1, 0x6d, 0xf5, 0x01, 0x1f, 0xc8, 0x72, 0x3b, 0x2a, 0x97, 0x55, 0x55, 0x8a, 0xb8, 0x70, 0xa1, 0x01, 0xaa, 0x4a, 0x45, 0x02, 0x27, 0x70, 0x28,
0xd0, 0x93, 0xf6, 0xf6, 0xb2, 0xbb, 0x2d, 0xd5, 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67, 0xf0, 0xfe, 0x34, 0x56, 0x96, 0x1d,
0x2a, 0x13, 0x34, 0xe5, 0xc2, 0xcb, 0xb3, 0x53, 0xe2, 0x4b, 0xaf, 0x54, 0xbb, 0x4c, 0x03, 0xb7, 0x2e, 0x4d, 0x5f, 0x18, 0xcb, 0xa5, 0x4b, 0xb5, 0x5f, 0x65, 0x82, 0xba, 0x5c, 0x78, 0x79, 0x76,
0x04, 0xbc, 0x72, 0xd8, 0x38, 0xad, 0x67, 0x9f, 0x4d, 0x1a, 0x9d, 0xaf, 0xd2, 0x5f, 0xe8, 0xf5, 0x4b, 0x72, 0xe9, 0x95, 0x6a, 0x97, 0x79, 0xe0, 0x8e, 0x80, 0x57, 0x8e, 0x1a, 0x67, 0xf5, 0xec,
0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x7b, 0x3e, 0x9f, 0xc4, 0x06, 0x00, 0x00, 0xb3, 0x49, 0xa3, 0x8b, 0x35, 0xfa, 0x3b, 0xbd, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0x39, 0x0c,
0xff, 0xa5, 0xdc, 0x06, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.

View File

@ -27,9 +27,11 @@ message TxFilter {
bytes hash = 3; bytes hash = 3;
} }
// RawTransaction contains the complete transaction data. // RawTransaction contains the complete transaction data. It also optionally includes
// the block height in which the transaction was included
message RawTransaction { message RawTransaction {
bytes data = 1; bytes data = 1;
uint64 height = 2;
} }
message SendResponse { message SendResponse {