Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/go_modules/google.golang.org/pr…
Browse files Browse the repository at this point in the history
…otobuf-1.33.0
  • Loading branch information
sydneynotthecity authored Apr 5, 2024
2 parents 6408d33 + 75c9a9c commit 9140e4a
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
template: |
## What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release Drafter and Publisher

on:
push:
tags:
- v*

permissions:
contents: read

jobs:
new_release:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

# ${{ github.ref }} was not giving v* as tag name, but refs/tags/v* instead, so I had to abbreviate it
- name: Get latest abbreviated tag
id: gettag
run: echo ::set-output name=TAG::$(git describe --tags --abbrev=7)

- uses: release-drafter/release-drafter@v5
with:
commitish: master
name: "stellar-etl ${{ steps.gettag.outputs.TAG }}"
tag: ${{ github.ref }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 9 additions & 10 deletions internal/transform/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,17 @@ func TransformOperation(operation xdr.Operation, operationIndex int32, transacti
return OperationOutput{}, err
}

outputOperationResults, ok := transaction.Result.Result.OperationResults()
if !ok {
return OperationOutput{}, err
}

outputOperationResultCode := outputOperationResults[operationIndex].Code.String()
var outputOperationResultCode string
var outputOperationTraceCode string
operationResultTr, ok := outputOperationResults[operationIndex].GetTr()
outputOperationResults, ok := transaction.Result.Result.OperationResults()
if ok {
outputOperationTraceCode, err = mapOperationTrace(operationResultTr)
if err != nil {
return OperationOutput{}, err
outputOperationResultCode = outputOperationResults[operationIndex].Code.String()
operationResultTr, ok := outputOperationResults[operationIndex].GetTr()
if ok {
outputOperationTraceCode, err = mapOperationTrace(operationResultTr)
if err != nil {
return OperationOutput{}, err
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/transform/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TransformTransaction(transaction ingest.LedgerTransaction, lhe xdr.LedgerHe
}

// TODO: FeeCharged is calculated incorrectly in protocol 20. Remove when protocol is updated and the bug is fixed
outputFeeCharged = outputFeeCharged - outputResourceFeeRefund
outputFeeCharged = outputResourceFee - outputResourceFeeRefund + outputInclusionFeeCharged
}

outputCloseTime, err := utils.TimePointToUTCTimeStamp(ledgerHeader.ScpValue.CloseTime)
Expand Down

0 comments on commit 9140e4a

Please sign in to comment.