-
Notifications
You must be signed in to change notification settings - Fork 115
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
go/consensus: add GasUsed to transaction results and Size to block header #5761
Conversation
✅ Deploy Preview for oasisprotocol-oasis-core canceled.
|
1c17caf
to
2b1d7a0
Compare
ff637b0
to
4492b2a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5761 +/- ##
==========================================
- Coverage 64.95% 64.87% -0.09%
==========================================
Files 620 620
Lines 63330 63339 +9
==========================================
- Hits 41138 41093 -45
- Misses 17346 17377 +31
- Partials 4846 4869 +23 ☔ View full report in Codecov by Sentry. |
go/consensus/tests/tester.go
Outdated
@@ -44,6 +44,7 @@ func ConsensusImplementationTests(t *testing.T, backend consensus.ClientBackend) | |||
require.NoError(err, "GetBlock") | |||
require.NotNil(blk, "returned block should not be nil") | |||
require.True(blk.Height > 0, "block height should be greater than zero") | |||
require.True(blk.Size > 0, "block size should be greater than zero") |
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.
Same here.
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.
require.True(blk.Size > 0, "block size should be greater than zero") | |
require.EqualValues(blk.Size, uint64(1178), "block size should match") |
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.
I don't think this will be deterministic as it depends on what transactions are in the "latest" block?
go/consensus/tests/tester.go
Outdated
@@ -44,6 +44,7 @@ func ConsensusImplementationTests(t *testing.T, backend consensus.ClientBackend) | |||
require.NoError(err, "GetBlock") | |||
require.NotNil(blk, "returned block should not be nil") | |||
require.True(blk.Height > 0, "block height should be greater than zero") | |||
require.True(blk.Size > 0, "block size should be greater than zero") |
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.
require.True(blk.Size > 0, "block size should be greater than zero") | |
require.EqualValues(blk.Size, uint64(1178), "block size should match") |
8ce5f78
to
b394fea
Compare
b394fea
to
90fa3ab
Compare
No description provided.