-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I took into account backward compatibility when adding the timestamp field into the JSON struct. I tried to add a test to check if we are still backward compatible. It seems that the std.Tx struct changed over time, so we won't be able to recover previous data. Signed-off-by: Antonio Navarro Perez <[email protected]>
- Loading branch information
Showing
7 changed files
with
85 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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,10 +1,13 @@ | ||
package types | ||
|
||
import "github.com/gnolang/gno/tm2/pkg/std" | ||
import ( | ||
"github.com/gnolang/gno/tm2/pkg/std" | ||
) | ||
|
||
// TxData contains the single block transaction, | ||
// along with the block information | ||
type TxData struct { | ||
Tx std.Tx `json:"tx"` | ||
BlockNum uint64 `json:"blockNum"` | ||
Tx std.Tx `json:"tx"` | ||
BlockNum uint64 `json:"blockNum"` | ||
Timestamp int64 `json:"bt"` | ||
} |