Skip to content

Commit

Permalink
Merge pull request #5540 from oasisprotocol/ptrus/stable/22.2.x/backp…
Browse files Browse the repository at this point in the history
…ort-5403

[BACKPORT/22.2.x] 5403
  • Loading branch information
ptrus authored Jan 24, 2024
2 parents c4d5b83 + 3aaf736 commit 15ebccf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/5403.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go/worker/client: Fix nil dereference on early Query
5 changes: 3 additions & 2 deletions go/worker/client/committee/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,14 @@ func (n *Node) Query(ctx context.Context, round uint64, method string, args []by
// Fetch the active descriptor so we can get the current message limits.
n.commonNode.CrossNode.Lock()
dsc := n.commonNode.CurrentDescriptor
latestRound := n.commonNode.CurrentBlock.Header.Round
blk := n.commonNode.CurrentBlock
n.commonNode.CrossNode.Unlock()

if dsc == nil {
if dsc == nil || blk == nil {
return nil, api.ErrNoHostedRuntime
}
maxMessages := dsc.Executor.MaxMessages
latestRound := n.commonNode.CurrentBlock.Header.Round

var resolvedRound uint64
queryFn := func(round uint64) ([]byte, error) {
Expand Down

0 comments on commit 15ebccf

Please sign in to comment.