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

Inconsistent transactionId field name on receipts/events #74

Open
peterbroadhurst opened this issue Jan 25, 2022 · 0 comments
Open

Inconsistent transactionId field name on receipts/events #74

peterbroadhurst opened this issue Jan 25, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@peterbroadhurst
Copy link
Contributor

We have a mix of:

  • transactionHash
  • transactionID
  • transactionId

Receipts seem to be the place that should change:

// TransactionReceipt is sent when a transaction has been successfully mined
type TransactionReceipt struct {
ReplyCommon
BlockNumber uint64 `json:"blockNumber"`
SignerMSP string `json:"signerMSP"`
Signer string `json:"signer"`
TransactionID string `json:"transactionID"`
Status string `json:"status"`
}
type ErrorReply struct {
ReplyCommon
ErrorMessage string `json:"errorMessage,omitempty"`
OriginalMessage string `json:"requestPayload,omitempty"`
TXHash string `json:"transactionHash,omitempty"`
}

To match events which use transactionId:

type EventEntry struct {
ChaincodeId string `json:"chaincodeId"`
BlockNumber uint64 `json:"blockNumber"`
TransactionId string `json:"transactionId"`
TransactionIndex int `json:"transactionIndex"`
EventName string `json:"eventName"`
Payload interface{} `json:"payload"`
Timestamp int64 `json:"timestamp,omitempty"`
SubID string `json:"subId"`
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants