Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: Accounting for protocol 22 related RPC changes #67

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/entities/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type RPCGetTransactionResult struct {
OldestLedger int64 `json:"oldestLedger"`
OldestLedgerCloseTime string `json:"oldestLedgerCloseTime"`
ApplicationOrder int64 `json:"applicationOrder"`
Hash string `json:"txHash"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gouthamp-stellar Do we have any unittests. That way we can ensure all such future changes are working fine.

EnvelopeXDR string `json:"envelopeXdr"`
ResultXDR string `json:"resultXdr"`
ResultMetaXDR string `json:"resultMetaXdr"`
Expand All @@ -41,15 +42,15 @@ type RPCGetTransactionResult struct {

type Transaction struct {
Status RPCStatus `json:"status"`
Hash string `json:"hash"`
Hash string `json:"txHash"`
ApplicationOrder int64 `json:"applicationOrder"`
FeeBump bool `json:"feeBump"`
EnvelopeXDR string `json:"envelopeXdr"`
ResultXDR string `json:"resultXdr"`
ResultMetaXDR string `json:"resultMetaXdr"`
Ledger int64 `json:"ledger"`
DiagnosticEventsXDR string `json:"diagnosticEventsXdr"`
CreatedAt int64 `json:"createdAt"`
CreatedAt uint32 `json:"createdAt"`
}

type RPCGetTransactionsResult struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/services/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (m *ingestService) ingestPayments(ctx context.Context, ledgerTransactions [
TransactionID: utils.TransactionID(int32(tx.Ledger), int32(tx.ApplicationOrder)),
TransactionHash: tx.Hash,
FromAddress: utils.SourceAccount(op, txEnvelopeXDR),
CreatedAt: time.Unix(tx.CreatedAt, 0),
CreatedAt: time.Unix(int64(tx.CreatedAt), 0),
Memo: txMemo,
MemoType: txMemoType,
}
Expand Down Expand Up @@ -231,7 +231,7 @@ func (m *ingestService) processTSSTransactions(ctx context.Context, ledgerTransa
Code: txCode,
EnvelopeXDR: tx.EnvelopeXDR,
ResultXDR: tx.ResultXDR,
CreatedAt: tx.CreatedAt,
CreatedAt: int64(tx.CreatedAt),
}
payload := tss.Payload{
RpcGetIngestTxResponse: tssGetIngestResponse,
Expand Down