Skip to content

Commit

Permalink
Rename a few more symbols/strings
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Oct 16, 2023
1 parent dc8a5c3 commit 3fcefd3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions ingest/stats_change_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ func (stats *StatsChangeProcessorResults) Map() map[string]interface{} {
"stats_config_settings_updated": stats.ConfigSettingsUpdated,
"stats_config_settings_removed": stats.ConfigSettingsRemoved,

"stats_expiration_created": stats.TtlCreated,
"stats_expiration_updated": stats.TtlUpdated,
"stats_expiration_removed": stats.TtlRemoved,
"stats_ttl_created": stats.TtlCreated,
"stats_ttl_updated": stats.TtlUpdated,
"stats_ttl_removed": stats.TtlRemoved,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ func (operation *transactionOperationWrapper) Details() (map[string]interface{},
}
case xdr.OperationTypeExtendFootprintTtl:
op := operation.operation.Body.MustExtendFootprintTtlOp()
details["ledgers_to_expire"] = op.ExtendTo
details["extend_to"] = op.ExtendTo
case xdr.OperationTypeRestoreFootprint:
default:
panic(fmt.Errorf("unknown operation type: %s", operation.OperationType()))
Expand Down
6 changes: 3 additions & 3 deletions services/horizon/internal/ingest/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ func (s *system) verifyState(verifyAgainstLatestCheckpoint bool) error {
}
totalByType["contract_data"]++
case xdr.LedgerEntryTypeTtl:
// we don't store expiration entries in the db,
// we don't store ttl entries in the db,
// so there is nothing to verify in that case.
if err = verifier.Write(entry); err != nil {
return err
}
totalByType["expiration"]++
totalByType["ttl"]++
default:
return errors.New("GetLedgerEntries return unexpected type")
}
Expand Down Expand Up @@ -322,7 +322,7 @@ func (s *system) verifyState(verifyAgainstLatestCheckpoint bool) error {

err = verifier.Verify(
countAccounts + countData + countOffers + countTrustLines + countClaimableBalances +
countLiquidityPools + int(totalByType["contract_data"]) + int(totalByType["expiration"]),
countLiquidityPools + int(totalByType["contract_data"]) + int(totalByType["ttl"]),
)
if err != nil {
return errors.Wrap(err, "verifier.Verify failed")
Expand Down
6 changes: 3 additions & 3 deletions services/horizon/internal/integration/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,18 @@ func submitSorobanOps(itest *integration.Test, tt *assert.Assertions) (submitted
installContractOp := assembleInstallContractCodeOp(itest.CurrentTest(), itest.Master().Address(), add_u64_contract)
itest.MustSubmitOperations(itest.MasterAccount(), itest.Master(), installContractOp)

bumpFootprintExpirationOp := &txnbuild.ExtendFootprintTtl{
extendFootprintTtlOp := &txnbuild.ExtendFootprintTtl{

Check failure on line 170 in services/horizon/internal/integration/db_test.go

View workflow job for this annotation

GitHub Actions / golangci

ST1003: var extendFootprintTtlOp should be extendFootprintTTLOp (stylecheck)
ExtendTo: 100,
SourceAccount: itest.Master().Address(),
}
itest.MustSubmitOperations(itest.MasterAccount(), itest.Master(), bumpFootprintExpirationOp)
itest.MustSubmitOperations(itest.MasterAccount(), itest.Master(), extendFootprintTtlOp)

restoreFootprintOp := &txnbuild.RestoreFootprint{
SourceAccount: itest.Master().Address(),
}
txResp := itest.MustSubmitOperations(itest.MasterAccount(), itest.Master(), restoreFootprintOp)

return []txnbuild.Operation{installContractOp, bumpFootprintExpirationOp, restoreFootprintOp}, txResp.Ledger
return []txnbuild.Operation{installContractOp, extendFootprintTtlOp, restoreFootprintOp}, txResp.Ledger
}

func submitSponsorshipOps(itest *integration.Test, tt *assert.Assertions) (submittedOperations []txnbuild.Operation, lastLedger int32) {
Expand Down
2 changes: 1 addition & 1 deletion xdr/ledger_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (data *LedgerEntryData) LedgerKey() (LedgerKey, error) {
return key, err
}
case LedgerEntryTypeTtl:
if err := key.SetExpiration(data.Ttl.KeyHash); err != nil {
if err := key.SetTtl(data.Ttl.KeyHash); err != nil {
return key, err
}
default:
Expand Down
4 changes: 2 additions & 2 deletions xdr/ledger_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ func (key *LedgerKey) SetConfigSetting(configSettingID ConfigSettingId) error {
return nil
}

// SetExpiration mutates `key` such that it represents the identity of an
// SetTtl mutates `key` such that it represents the identity of an
// expiration entry.
func (key *LedgerKey) SetExpiration(keyHash Hash) error {
func (key *LedgerKey) SetTtl(keyHash Hash) error {

Check failure on line 193 in xdr/ledger_key.go

View workflow job for this annotation

GitHub Actions / golangci

ST1003: method SetTtl should be SetTTL (stylecheck)
data := LedgerKeyTtl{
KeyHash: keyHash,
}
Expand Down

0 comments on commit 3fcefd3

Please sign in to comment.