-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Currently, some of the Transaction-related objects have two forms, which implement normal type and for marshaling.
codechain-sdk-go/core/transaction/signedTransaction.go
Lines 11 to 17 in 6ad3e76
| type SignedTransactionJSON struct { | |
| BlockNumber int `json:"blockNumber,omitempty"` | |
| BlockHash string `json:"blockHash,omitempty"` | |
| TransactionIndex int `json:"transactionIndex,omitempty"` | |
| Sig string `json:"sig"` | |
| Hash string `json:"hash"` | |
| } |
codechain-sdk-go/core/transaction/signedTransaction.go
Lines 19 to 25 in 6ad3e76
| type SignedTransaction struct { | |
| Unsigned TransactionInterface | |
| BlockNumber *int | |
| BlockHash *primitives.H256 | |
| TransactionIndex *int | |
| signature []byte | |
| } |
This implementation is from codechain-sdk-js.
But since golang can implement custom marshaling function (link1) (link2), I think duplication of the objects is unnecessary.
Metadata
Metadata
Assignees
Labels
No labels