-
Notifications
You must be signed in to change notification settings - Fork 325
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
[block] blocksync to use block.WithBlobSidecars() #4402
Conversation
} | ||
|
||
// ToProto converts to proto message | ||
func (in *Store) ToProtoWithoutSidecar() *iotextypes.BlockStore { |
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.
it is better to add this func to be specifically used by who needs it
Quality Gate passedIssues Measures |
for _, v := range s.buffer { | ||
blkStores = append(blkStores, v.ToProto()) | ||
blkStores = append(blkStores, v.ToProtoWithoutSidecar()) |
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.
here is where 16 blocks are packed together and written to file/disk, so need to remove blob sidecar before doing that
@@ -692,7 +693,7 @@ func addTestingGetBlockHash(t *testing.T, g genesis.Genesis, bc blockchain.Block | |||
bcHash, err = dao.GetBlockHash(targetHeight) | |||
require.NoError(err) | |||
} | |||
require.Equal(r.Logs()[0].Topics[0], bcHash) | |||
require.Equal(r.Logs()[0].Topics[1], bcHash) |
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.
topic[0]
is actually the contract address and wrong value to compare, the correct value is topic[1]
test passes b/c before Aleutian height there's a bug that all topics are overwritten by last topic's value so topic[0] == topic[1]
in this test
so set the Aleutian height to correct the test (test will fail if still compare with topic[0])
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #(issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: