Skip to content

Inconsistent transactionId field name on receipts/events #74

@peterbroadhurst

Description

@peterbroadhurst

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"`
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions