Function
newAddress
(ctx contractapi.TransactionContextInterface, prefix string)
Source from the content-addressed store, hash-verified
| 252 | } |
| 253 | |
| 254 | func newAddress(ctx contractapi.TransactionContextInterface, prefix string) string { |
| 255 | sum := sha256.Sum256([]byte(prefix + ":" + ctx.GetStub().GetTxID())) |
| 256 | return hex.EncodeToString(sum[:]) |
| 257 | } |
| 258 | |
| 259 | func txUnixTime(ctx contractapi.TransactionContextInterface) (int64, error) { |
| 260 | timestamp, err := ctx.GetStub().GetTxTimestamp() |
Tested by
no test coverage detected