Refactor block file logic + util.h/cpp moved to util/system.h#2336
Conversation
c121a5f to
5629d03
Compare
5629d03 to
9529162
Compare
|
Rebased after #2326 merge, ready to go. |
9529162 to
894890a
Compare
|
rebased on master so this work gets more test coverage. |
3a901d6 to
c4a798c
Compare
random-zebra
left a comment
There was a problem hiding this comment.
Nice. ACK c4a798ce586b7bbc54de7263fc7f8a21ed8c709e
b9ec374 to
2e35dea
Compare
|
rebased due conflicts with a recently merged PR, ready to go. |
random-zebra
left a comment
There was a problem hiding this comment.
utACK 2e35deac47440eba59863d81a6cbd3853c7a8bf6 after rebase
2e35dea to
b1a4b50
Compare
|
rebased. |
random-zebra
left a comment
There was a problem hiding this comment.
re-re-utACK b1a4b50c28390e8058b7fe9cffec09b6ee7b2529 after rebase
Fuzzbawls
left a comment
There was a problem hiding this comment.
Aside from introducing a couple compiler warnings that can be fixed directly here, or in a small followup PR,
ACK b1a4b50c28390e8058b7fe9cffec09b6ee7b2529
There was a problem hiding this comment.
bytes_allocated is never used, because we don't have block pruning yet. This introduces a compiler warning that can be squelched by simply re-writing the line as follows until block pruning is introduced.
/*size_t bytes_allocated = */BlockFileSeq().Allocate(pos, nAddSize, out_of_space);There was a problem hiding this comment.
same as above
/*size_t bytes_allocated = */UndoFileSeq().Allocate(pos, nAddSize, out_of_space);-BEGIN VERIFY SCRIPT- sed -i 's/CDiskBlockPos/FlatFilePos/g' $(git ls-files 'src/*.h' 'src/*.cpp') -END VERIFY SCRIPT-
b1a4b50 to
3e48fc1
Compare
|
Merging.. |
…r_basic_data 23d31db [BUG][Tests] Properly set temporary datadir for dbwrapper_basic_data (random-zebra) Pull request description: Few cases left out in #2336 ACKs for top commit: Fuzzbawls: ACK 23d31db furszy: ACK 23d31db and merging Tree-SHA512: fac4fdd14b028520a473b234faac9e9472869ff1e97948c31af126554bc959ef6b920979e62036bb61189728635801367dc1fe35c8fdac828633fe95bc38d073
This is part of the block logic refactoring and encapsulation work coming from upstream (work started in #2326 and #2328 due the possible blocks db corruption issue).
Needed for two future works: (1) faster block validation using a new cache structure and (2) the future possible custom BIP157 (new sync protocol that supersedes BIP37 for light clients -- pending research needed after finishing v6.0 priorities --)
Essentially, it's encapsulating the sequenced files open/read/write functionalities inside a new
flatfilemodule, and extending the unit test coverage to validate its correct behavior.Adapted the following PRs:
util.h/cppfiles mv toutil/system.h&util/system.cpp.