This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add JSON format to import blocks and set it as default #5816
Add JSON format to import blocks and set it as default #5816
Changes from 61 commits
0bb1eb7
b291ff1
49b0144
cb6aded
155695d
e59e1ad
7b729fe
69a8bff
ab173a5
e22ed9b
00fbd6c
e7a3c4d
56d49fa
ff75523
7c66af2
419b0ab
be1d626
a67a75d
e1ce1aa
30f60de
ecf8729
7b8f34c
1a9e910
61260b5
4ca8fe6
c986b44
8b3a17a
c57415b
32eb4af
412e942
2266d67
f62d5e0
ad44445
17f4c74
994157c
4d1234e
37ae67b
757693d
9865fae
1150f12
377823c
576606c
9b4658a
76a5954
f848a05
d924935
3d00933
fb040fc
4f9bcf8
9a134eb
fdd3683
d98c92d
344286e
5bdc4fd
5d1f1e3
768c309
a17cc1e
9d7d7a1
03a5cc8
ef02ec3
fb91c53
4f067ef
0c47a45
196de60
731f1b7
f43f3de
cdc1290
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Why delete files manually if
TempDir
is supposed to handle that?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.
So this was part of the original test and I believe the main idea is to run the node, export the blocks, and then delete the DB to make sure that
import-blocks
is actually importing blocks, and not "doing nothing".Maybe what we should add is a test to see that import blocks actually imported blocks? Not sure how to do that, I wouldn't really know what we could query...
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.
@arkpar Yes that was my code actually. First create the temp directory, export, delete the directory, import and then only let the destructor clean-up. It was done on purpose but you could also create another tempdir instead of reusing one, it might make the code more understandable.
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.
So keep in mind that now that we've changed the test flow, we need to keep the same directory active for the whole testing period, in order to keep the db :)
I believe the
remove_dir_all
only happens between theexport-blocks
command and theimport-blocks
which makes sense, so that we make sure that we are indeed importing stuff! :)This file was deleted.