Page MenuHomePhabricator

Test LoadExternalBlockFile explictly for blocks larger than 2*MAX_TX_SIZE
ClosedPublic

Authored by awemany on Jun 13 2017, 18:22.

Details

Summary

This checks that the buffering logic in CBufferedFile/LoadExternalBlockFile
works as intended and doesn't fail for blacks larger than the buffer size.

Test Plan

make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
test-load-external-block-file
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 257
Build 257: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Jun 13 2017, 18:31
deadalnix added inline comments.
src/test/validation_tests.cpp
39 ↗(On Diff #434)

Remove.

47 ↗(On Diff #434)
size_t written = fwrite(chainparams.MessageStart(), CMessageHeader::MESSAGE_START_SIZE, 1, fp)
BOOST_CHECK_EQUAL(written, 1);
55 ↗(On Diff #434)

Please BOOST_CHECK the size of the block is larger than what you expect to test.

67 ↗(On Diff #434)

I'm not sure what this is testing. You need to be asserting something at the end.

This revision now requires changes to proceed.Jun 13 2017, 18:31
awemany edited edge metadata.

Address review issues raised by deadalnix.

This revision is now accepted and ready to land.Jun 13 2017, 18:46
This revision was automatically updated to reflect the committed changes.
awemany marked 4 inline comments as done.