Add indexer tests for handling non canonical blocks #254

Merged
prathamesh0 merged 9 commits from pm-failing-tests into v1.10.21-statediff-v4 2022-08-12 10:16:14 +00:00
Showing only changes of commit 9791acf022 - Show all commits

View File

@ -751,12 +751,12 @@ func testPublishAndIndexLogsNonCanonical(t *testing.T) {
require.NoError(t, err)
if len(nodeElements) == 2 {
logRaw, err := rlp.EncodeToBytes(&log)
logRaw, err := rlp.EncodeToBytes(log)
require.NoError(t, err)
// 2nd element of the leaf node contains the encoded log data.
require.Equal(t, nodeElements[1].([]byte), logRaw)
} else {
logRaw, err := rlp.EncodeToBytes(&log)
logRaw, err := rlp.EncodeToBytes(log)
require.NoError(t, err)
// raw log was IPLDized
require.Equal(t, logRes[i].IPLDData, logRaw)