mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
Implement AttestationPool and ListAttestations RPC Functions (#3061)
This commit is contained in:
committed by
terence tsao
parent
40fca7bb2c
commit
4ebe2fb5b5
@@ -25,7 +25,7 @@ func StartAndEndPage(pageToken string, pageSize int, totalSize int) (int, int, s
|
||||
// Start page can not be greater than validator size.
|
||||
start := token * pageSize
|
||||
if start >= totalSize {
|
||||
return 0, 0, "", fmt.Errorf("page start %d >= validator list %d", start, totalSize)
|
||||
return 0, 0, "", fmt.Errorf("page start %d >= list %d", start, totalSize)
|
||||
}
|
||||
|
||||
// End page can not go out of bound.
|
||||
|
||||
@@ -73,7 +73,7 @@ func TestStartAndEndPage_CannotConvertPage(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestStartAndEndPage_ExceedsMaxPage(t *testing.T) {
|
||||
wanted := "page start 0 >= validator list 0"
|
||||
wanted := "page start 0 >= list 0"
|
||||
if _, _, _, err := StartAndEndPage("", 0, 0); !strings.Contains(err.Error(), wanted) {
|
||||
t.Fatalf("wanted error: %v, got error: %v", wanted, err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user