-
Notifications
You must be signed in to change notification settings - Fork 22
feat:added changes to implement poolDistresult #1256
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
b0136bf
554c1e2
6a763b6
a4ae7aa
6657aad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -836,11 +836,24 @@ func (c *Client) GetPoolDistr(poolIds []any) (*PoolDistrResult, error) { | |
| if err != nil { | ||
| return nil, err | ||
| } | ||
| query := buildShelleyQuery( | ||
| currentEra, | ||
| QueryTypeShelleyPoolDistr, | ||
| // TODO: add args (#870) | ||
| ) | ||
| // If no pool IDs specified, query without parameters (get all pools) | ||
| // Otherwise, query with specific pool IDs as a CBOR set | ||
| var query []any | ||
| if len(poolIds) == 0 { | ||
| query = buildShelleyQuery( | ||
| currentEra, | ||
| QueryTypeShelleyPoolDistr, | ||
| ) | ||
| } else { | ||
| query = buildShelleyQuery( | ||
|
||
| currentEra, | ||
| QueryTypeShelleyPoolDistr, | ||
| cbor.Tag{ | ||
| Number: cbor.CborTagSet, | ||
| Content: poolIds, | ||
| }, | ||
|
||
| ) | ||
| } | ||
| var result PoolDistrResult | ||
| if err := c.runQuery(query, &result); err != nil { | ||
| return nil, err | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: JSON marshaling error handling is inconsistent with other cases in this file. Other cases (e.g.,
utxos-by-address,utxos-by-txin) callos.Exit(1)after JSON marshal failures and useERROR:prefix format. This case silently continues execution.Prompt for AI agents