Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if results too large get each result one at a time #1118

Closed
wants to merge 13 commits into from
11 changes: 11 additions & 0 deletions flowkit/flowkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,17 @@ func (f *Flowkit) GetTransactionsByBlockID(

txRes, err := f.gateway.GetTransactionResultsByBlockID(blockID)
if err != nil {
bjartek marked this conversation as resolved.
Show resolved Hide resolved
if strings.Contains(err.Error(), "received message larger than max") {
txRes := []*flow.TransactionResult{}
for _, transaction := range tx {
txr, err := f.gateway.GetTransactionResult(transaction.ID(), true)
if err != nil {
return nil, nil, err
}
txRes = append(txRes, txr)
}
return tx, txRes, nil
}
return nil, nil, err
}
return tx, txRes, nil
Expand Down