Skip to content

Commit

Permalink
response execution support for signature
Browse files Browse the repository at this point in the history
  • Loading branch information
zees-dev committed Jun 15, 2024
1 parent 7b8350d commit 6336467
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions models/execute/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type Result struct {
Result RuntimeOutput `json:"result"`
RequestID string `json:"request_id"`
Usage Usage `json:"usage,omitempty"`
Signature []byte `json:"signature,omitempty"`
}

// Cluster represents the set of peers that executed the request.
Expand Down
2 changes: 2 additions & 0 deletions node/worker_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package node

import (
"context"
"encoding/hex"
"fmt"
"time"

Expand Down Expand Up @@ -47,6 +48,7 @@ func (n *Node) workerProcessExecute(ctx context.Context, from peer.ID, req reque
Results: execute.ResultMap{
n.host.ID(): result,
},
Signature: hex.EncodeToString(result.Signature),
}

// Send the response, whatever it may be (success or failure).
Expand Down

0 comments on commit 6336467

Please sign in to comment.