-
Notifications
You must be signed in to change notification settings - Fork 15
New timestamp field in all structures #345
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1e96aa7
timestamp ms all structures
miiu96 b367efd
fix build
miiu96 eda0fe2
fix unit tests
miiu96 0637870
fix integration tests 1
miiu96 69c7173
fixes
miiu96 3d1707e
Merge branch 'rc/barnard' into timestamp-ms-all-structuress
miiu96 ebeda3c
fix integration and unit test
miiu96 8f7c1bf
fixes timestamp ms
miiu96 37f5294
fixes and refactoring
miiu96 1889119
fixes after review
miiu96 f4cb56b
fix
miiu96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,23 @@ | ||
| package data | ||
|
|
||
| import "time" | ||
|
|
||
| // Delegator is a structure that is needed to store information about a delegator | ||
| type Delegator struct { | ||
| Address string `json:"address"` | ||
| Contract string `json:"contract"` | ||
| Timestamp time.Duration `json:"timestamp"` | ||
| ActiveStake string `json:"activeStake"` | ||
| ActiveStakeNum float64 `json:"activeStakeNum"` | ||
| ShouldDelete bool `json:"-"` | ||
| UnDelegateInfo *UnDelegate `json:"-"` | ||
| WithdrawFundIDs []string `json:"-"` | ||
| Address string `json:"address"` | ||
| Contract string `json:"contract"` | ||
| Timestamp uint64 `json:"timestamp"` | ||
| TimestampMs uint64 `json:"timestampMs,omitempty"` | ||
| ActiveStake string `json:"activeStake"` | ||
| ActiveStakeNum float64 `json:"activeStakeNum"` | ||
| ShouldDelete bool `json:"-"` | ||
| UnDelegateInfo *UnDelegate `json:"-"` | ||
| WithdrawFundIDs []string `json:"-"` | ||
| } | ||
|
|
||
| // UnDelegate is a structure that is needed to store information about user unDelegate position | ||
| type UnDelegate struct { | ||
| Timestamp time.Duration `json:"timestamp"` | ||
| ID string `json:"id"` | ||
| Value string `json:"value"` | ||
| ValueNum float64 `json:"valueNum"` | ||
| Timestamp uint64 `json:"timestamp"` | ||
| TimestampMs uint64 `json:"timestampMs,omitempty"` | ||
| ID string `json:"id"` | ||
| Value string `json:"value"` | ||
| ValueNum float64 `json:"valueNum"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,20 @@ | ||
| package data | ||
|
|
||
| import "time" | ||
|
|
||
| // LogEvent is the dto for the log event structure | ||
| type LogEvent struct { | ||
| UUID string `json:"uuid"` | ||
| ID string `json:"-"` | ||
| TxHash string `json:"txHash"` | ||
| OriginalTxHash string `json:"originalTxHash,omitempty"` | ||
| LogAddress string `json:"logAddress"` | ||
| Address string `json:"address"` | ||
| Identifier string `json:"identifier"` | ||
| Data string `json:"data,omitempty"` | ||
| AdditionalData []string `json:"additionalData,omitempty"` | ||
| Topics []string `json:"topics"` | ||
| Order int `json:"order"` | ||
| TxOrder int `json:"txOrder"` | ||
| ShardID uint32 `json:"shardID"` | ||
| Timestamp time.Duration `json:"timestamp,omitempty"` | ||
| UUID string `json:"uuid"` | ||
| ID string `json:"-"` | ||
| TxHash string `json:"txHash"` | ||
| OriginalTxHash string `json:"originalTxHash,omitempty"` | ||
| LogAddress string `json:"logAddress"` | ||
| Address string `json:"address"` | ||
| Identifier string `json:"identifier"` | ||
| Data string `json:"data,omitempty"` | ||
| AdditionalData []string `json:"additionalData,omitempty"` | ||
| Topics []string `json:"topics"` | ||
| Order int `json:"order"` | ||
| TxOrder int `json:"txOrder"` | ||
| ShardID uint32 `json:"shardID"` | ||
| Timestamp uint64 `json:"timestamp,omitempty"` | ||
| TimestampMs uint64 `json:"timestampMs,omitempty"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,48 @@ | ||
| package data | ||
|
|
||
| import "time" | ||
|
|
||
| // ScResult is a structure containing all the fields that need to be saved for a smart contract result | ||
| type ScResult struct { | ||
| UUID string `json:"uuid"` | ||
| Hash string `json:"-"` | ||
| MBHash string `json:"miniBlockHash,omitempty"` | ||
| Nonce uint64 `json:"nonce"` | ||
| GasLimit uint64 `json:"gasLimit"` | ||
| GasPrice uint64 `json:"gasPrice"` | ||
| Value string `json:"value"` | ||
| ValueNum float64 `json:"valueNum"` | ||
| Sender string `json:"sender"` | ||
| Receiver string `json:"receiver"` | ||
| SenderShard uint32 `json:"senderShard"` | ||
| ReceiverShard uint32 `json:"receiverShard"` | ||
| RelayerAddr string `json:"relayerAddr,omitempty"` | ||
| RelayedValue string `json:"relayedValue,omitempty"` | ||
| Code string `json:"code,omitempty"` | ||
| Data []byte `json:"data,omitempty"` | ||
| PrevTxHash string `json:"prevTxHash"` | ||
| OriginalTxHash string `json:"originalTxHash"` | ||
| CallType string `json:"callType"` | ||
| CodeMetadata []byte `json:"codeMetaData,omitempty"` | ||
| ReturnMessage string `json:"returnMessage,omitempty"` | ||
| Timestamp time.Duration `json:"timestamp"` | ||
| HasOperations bool `json:"hasOperations,omitempty"` | ||
| Type string `json:"type,omitempty"` | ||
| Status string `json:"status,omitempty"` | ||
| Tokens []string `json:"tokens,omitempty"` | ||
| ESDTValues []string `json:"esdtValues,omitempty"` | ||
| ESDTValuesNum []float64 `json:"esdtValuesNum,omitempty"` | ||
| Receivers []string `json:"receivers,omitempty"` | ||
| ReceiversShardIDs []uint32 `json:"receiversShardIDs,omitempty"` | ||
| Operation string `json:"operation,omitempty"` | ||
| Function string `json:"function,omitempty"` | ||
| IsRelayed bool `json:"isRelayed,omitempty"` | ||
| CanBeIgnored bool `json:"canBeIgnored,omitempty"` | ||
| OriginalSender string `json:"originalSender,omitempty"` | ||
| HasLogs bool `json:"hasLogs,omitempty"` | ||
| Epoch uint32 `json:"epoch"` | ||
| ExecutionOrder int `json:"-"` | ||
| SenderAddressBytes []byte `json:"-"` | ||
| InitialTxGasUsed uint64 `json:"-"` | ||
| InitialTxFee string `json:"-"` | ||
| GasRefunded uint64 `json:"-"` | ||
| UUID string `json:"uuid"` | ||
| Hash string `json:"-"` | ||
| MBHash string `json:"miniBlockHash,omitempty"` | ||
| Nonce uint64 `json:"nonce"` | ||
| GasLimit uint64 `json:"gasLimit"` | ||
| GasPrice uint64 `json:"gasPrice"` | ||
| Value string `json:"value"` | ||
| ValueNum float64 `json:"valueNum"` | ||
| Sender string `json:"sender"` | ||
| Receiver string `json:"receiver"` | ||
| SenderShard uint32 `json:"senderShard"` | ||
| ReceiverShard uint32 `json:"receiverShard"` | ||
| RelayerAddr string `json:"relayerAddr,omitempty"` | ||
| RelayedValue string `json:"relayedValue,omitempty"` | ||
| Code string `json:"code,omitempty"` | ||
| Data []byte `json:"data,omitempty"` | ||
| PrevTxHash string `json:"prevTxHash"` | ||
| OriginalTxHash string `json:"originalTxHash"` | ||
| CallType string `json:"callType"` | ||
| CodeMetadata []byte `json:"codeMetaData,omitempty"` | ||
| ReturnMessage string `json:"returnMessage,omitempty"` | ||
| Timestamp uint64 `json:"timestamp"` | ||
| TimestampMs uint64 `json:"timestampMs,omitempty"` | ||
| HasOperations bool `json:"hasOperations,omitempty"` | ||
| Type string `json:"type,omitempty"` | ||
| Status string `json:"status,omitempty"` | ||
| Tokens []string `json:"tokens,omitempty"` | ||
| ESDTValues []string `json:"esdtValues,omitempty"` | ||
| ESDTValuesNum []float64 `json:"esdtValuesNum,omitempty"` | ||
| Receivers []string `json:"receivers,omitempty"` | ||
| ReceiversShardIDs []uint32 `json:"receiversShardIDs,omitempty"` | ||
| Operation string `json:"operation,omitempty"` | ||
| Function string `json:"function,omitempty"` | ||
| IsRelayed bool `json:"isRelayed,omitempty"` | ||
| CanBeIgnored bool `json:"canBeIgnored,omitempty"` | ||
| OriginalSender string `json:"originalSender,omitempty"` | ||
| HasLogs bool `json:"hasLogs,omitempty"` | ||
| Epoch uint32 `json:"epoch"` | ||
| ExecutionOrder int `json:"-"` | ||
| SenderAddressBytes []byte `json:"-"` | ||
| InitialTxGasUsed uint64 `json:"-"` | ||
| InitialTxFee string `json:"-"` | ||
| GasRefunded uint64 `json:"-"` | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The
TimestampMsfield inUpgradelacks theomitemptyJSON tag, which causes zero values to always be serialized. Consider addingomitemptyfor consistency with other timestamp fields.