Skip to content

Commit 8ad0dd5

Browse files
committed
Rename GetWithRound to GetForRound.
1 parent 3632133 commit 8ad0dd5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

data/account/participationRegistry.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ type ParticipationRegistry interface {
192192
// GetAll of the participation records.
193193
GetAll() []ParticipationRecord
194194

195-
// GetWithSecrets fetches a record with all secrets for a particular round.
196-
GetWithSecrets(id ParticipationID, round basics.Round) (ParticipationRecordForRound, error)
195+
// GetForRound fetches a record with all secrets for a particular round.
196+
GetForRound(id ParticipationID, round basics.Round) (ParticipationRecordForRound, error)
197197

198198
// Register updates the EffectiveFirst and EffectiveLast fields. If there are multiple records for the account
199199
// then it is possible for multiple records to be updated.
@@ -863,8 +863,8 @@ func (db *participationDB) GetAll() []ParticipationRecord {
863863
return results
864864
}
865865

866-
// GetWithSecrets fetches a record with all secrets for a particular round.
867-
func (db *participationDB) GetWithSecrets(id ParticipationID, round basics.Round) (ParticipationRecordForRound, error) {
866+
// GetForRound fetches a record with all secrets for a particular round.
867+
func (db *participationDB) GetForRound(id ParticipationID, round basics.Round) (ParticipationRecordForRound, error) {
868868
var result ParticipationRecordForRound
869869
result.ParticipationRecord = db.Get(id)
870870
if result.ParticipationRecord.IsZero() {

data/account/participationRegistry_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ func TestAddStateProofKeys(t *testing.T) {
749749

750750
// Make sure we're able to fetch the same data that was put in.
751751
for i := uint64(0); i <= max; i++ {
752-
r, err := registry.GetWithSecrets(id, basics.Round(i))
752+
r, err := registry.GetForRound(id, basics.Round(i))
753753
a.NoError(err)
754754
a.Equal(keys[i], r.StateProof)
755755
number := binary.LittleEndian.Uint64(r.StateProof)
@@ -769,7 +769,7 @@ func TestSecretNotFound(t *testing.T) {
769769
a.NoError(err)
770770
a.Equal(p.ID(), id)
771771

772-
r, err := registry.GetWithSecrets(id, basics.Round(100))
772+
r, err := registry.GetForRound(id, basics.Round(100))
773773

774774
a.True(r.IsZero())
775775
a.Error(err)

0 commit comments

Comments
 (0)