AntelopeIO / leap

C++ implementation of the Antelope protocol
Other
113 stars 69 forks source link

IF: Include `block_state::valid` in the snapshot. #2303

Closed greg7mdp closed 3 months ago

greg7mdp commented 3 months ago

@linh2931 this is a PR adding the snapshot fix into your branch.

greg7mdp commented 3 months ago

Thanks. No changes to the tests?

No change. I guess we don't have a test that uses the new valid member yet.

heifner commented 3 months ago

Thanks. No changes to the tests?

No change. I guess we don't have a test that uses the new valid member yet.

Don't you need to udpate: unittests/snapshots/snap_v7.bin.*

greg7mdp commented 3 months ago

Don't you need to udpate: unittests/snapshots/snap_v7.bin.*

I didn't have to. The test that uses those files (test_compatible_versions in unittests) doesn't run in IF mode I guess, so it must save the block_state_legacy in the variant.

However some other (integration) tests do load a post-transition snapshot.

heifner commented 3 months ago

Don't you need to udpate: unittests/snapshots/snap_v7.bin.*

I didn't have to. The test that uses those files (test_compatible_versions in unittests) doesn't run in IF mode I guess, so it must save the block_state_legacy in the variant.

That is a test we certainly want to run in both modes.

greg7mdp commented 3 months ago

That is a test we certainly want to run in both modes.

Hum, not sure about this particular one, it is meant to verify that we can load old snapshot versions.