-
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 all 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,10 +836,18 @@ func (c *Client) GetPoolDistr(poolIds []any) (*PoolDistrResult, error) { | |||||
| if err != nil { | ||||||
| return nil, err | ||||||
| } | ||||||
| // GetPoolDistr always requires a pool set parameter according to the Haskell implementation | ||||||
| // The query expects (len=2, tag=21) format: [21, Set(poolIds)] | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The comment is misleading: 'tag=21' refers to the query type, not a CBOR tag. The CBOR set tag is actually 258 ( Prompt for AI agents
Suggested change
|
||||||
| // If no pool IDs specified, use an empty set to query all pools | ||||||
| var params []any | ||||||
| if poolIds == nil { | ||||||
| poolIds = []any{} | ||||||
| } | ||||||
| params = append(params, cbor.Set(poolIds)) | ||||||
| query := buildShelleyQuery( | ||||||
| currentEra, | ||||||
| QueryTypeShelleyPoolDistr, | ||||||
| // TODO: add args (#870) | ||||||
| params..., | ||||||
| ) | ||||||
| var result PoolDistrResult | ||||||
| if err := c.runQuery(query, &result); err != nil { | ||||||
|
|
||||||
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