Skip to content

Commit 28e9eca

Browse files
Make fields in ledger.Creatable public. (#3125)
Summary Indexer needs to be able to set those fields.
1 parent f17f8f6 commit 28e9eca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ledger/evalindexer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ type EvalForIndexerResources struct {
5959

6060
// Creatable represent a single creatable object.
6161
type Creatable struct {
62-
cindex basics.CreatableIndex
63-
ctype basics.CreatableType
62+
Index basics.CreatableIndex
63+
Type basics.CreatableType
6464
}
6565

6666
// Converter between indexerLedgerForEval and ledgerForEvaluator interfaces.
@@ -116,7 +116,7 @@ func (l indexerLedgerConnector) GetCreatorForRound(_ basics.Round, cindex basics
116116
var foundAddress FoundAddress
117117
var has bool
118118
// check to see if the account data in the cache.
119-
if foundAddress, has = l.roundResources.Creators[Creatable{cindex: cindex, ctype: ctype}]; has {
119+
if foundAddress, has = l.roundResources.Creators[Creatable{Index: cindex, Type: ctype}]; has {
120120
return foundAddress.Address, foundAddress.Exists, nil
121121
}
122122

ledger/evalindexer_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ func TestResourceCaching(t *testing.T) {
280280
},
281281
},
282282
Creators: map[Creatable]FoundAddress{
283-
{cindex: basics.CreatableIndex(6), ctype: basics.AssetCreatable}: {Address: address, Exists: true},
284-
{cindex: basics.CreatableIndex(6), ctype: basics.AppCreatable}: {Address: address, Exists: false},
283+
{Index: basics.CreatableIndex(6), Type: basics.AssetCreatable}: {Address: address, Exists: true},
284+
{Index: basics.CreatableIndex(6), Type: basics.AppCreatable}: {Address: address, Exists: false},
285285
},
286286
}
287287

0 commit comments

Comments
 (0)