Skip to content

Commit

Permalink
Typos caught in CR
Browse files Browse the repository at this point in the history
  • Loading branch information
jannotti committed Jun 11, 2024
1 parent 610b060 commit 13038d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
18 changes: 1 addition & 17 deletions data/transactions/logic/assembler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,28 +626,12 @@ func assembleWithTrace(text string, ver uint64) (*OpStream, error) {
return &ops, err
}

func lines(s string, num int) (bool, string) {
if num < 1 {
return true, ""
}
found := 0
for i := 0; i < len(s); i++ {
if s[i] == '\n' {
found++
if found == num {
return true, s[0 : i+1]
}
}
}
return false, s
}

func summarize(trace *strings.Builder) string {
all := trace.String()
if strings.Count(all, "\n") < 50 {
return all
}
lines := strings.Split(trace.String(), "\n")
lines := strings.Split(all, "\n")
return strings.Join(lines[:20], "\n") + "\n(some trace elided)\n" + strings.Join(lines[len(lines)-20:], "\n")
}

Expand Down
4 changes: 2 additions & 2 deletions data/transactions/logic/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ const (
// PayoutsMinBalance is the minimum algo balance an account must have to receive block payouts (in the agreement round).
PayoutsMinBalance

// PayoutsMaxBalance is the minimum algo balance an account must have to receive block payouts (in the agreement round).
// PayoutsMaxBalance is the maximum algo balance an account can have to receive block payouts (in the agreement round).
PayoutsMaxBalance

invalidGlobalField // compile-time constant for number of fields
Expand Down Expand Up @@ -628,7 +628,7 @@ var globalFieldSpecs = [...]globalFieldSpec{
{PayoutsMinBalance, StackUint64, modeAny, incentiveVersion,
"The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round."},
{PayoutsMaxBalance, StackUint64, modeAny, incentiveVersion,
"The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round."},
"The maximum algo balance an account can have in the agreement round to receive block payouts in the proposal round."},
}

func globalFieldSpecByField(f GlobalField) (globalFieldSpec, bool) {
Expand Down

0 comments on commit 13038d4

Please sign in to comment.