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

exp/ingest/ledgerbackend: Ensure tx meta is v2 when getting protocol version <10 ledgers #2099

Merged
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
6 changes: 6 additions & 0 deletions exp/ingest/ledgerbackend/database_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ func (dbb *DatabaseBackend) GetLedger(sequence uint32) (bool, LedgerCloseMeta, e
lcm.TransactionEnvelope = append(lcm.TransactionEnvelope, tx.TXBody)
lcm.TransactionResult = append(lcm.TransactionResult, tx.TXResult)
lcm.TransactionMeta = append(lcm.TransactionMeta, tx.TXMeta)

if lcm.LedgerHeader.Header.LedgerVersion < 10 && tx.TXMeta.V != 2 {
return false, lcm,
errors.New("TransactionMeta.V=2 is required in protocol version older than version 10. " +
"Please process ledgers again using stellar-core with SUPPORTED_META_VERSION=2 in the config file.")
}
}

// Query - txfeehistory
Expand Down