Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ pub contract Counter {
}
// docs:end:txe_test_increment

// TODO(#13221): I had to comment out all the env.advance_block_by(1) and sync_notes() calls because that triggered
// an issue with how state is committed. The calls to advance_block_by(1) seems to have always been unnecessary
// in this test but anyway we should fix the issue and try to get the block advancing working here.
#[test]
unconstrained fn extended_incrementing_and_decrementing() {
let initial_value = 5;
Expand All @@ -159,7 +156,7 @@ pub contract Counter {
);

// Checking that the note was discovered from private logs
// env.advance_block_by(1);
env.advance_block_by(1);
sync_notes();
env.impersonate(contract_address);
let counter_slot = Counter::storage_layout().counters.slot;
Expand All @@ -182,7 +179,7 @@ pub contract Counter {
assert(get_counter(owner) == 7);

// Checking that the note was discovered from private logs
// env.advance_block_by(1);
env.advance_block_by(1);
sync_notes();
let notes: BoundedVec<ValueNote, MAX_NOTES_PER_PAGE> =
view_notes(owner_storage_slot, options);
Expand All @@ -198,7 +195,7 @@ pub contract Counter {
assert(notes.len() == 4);

// Checking that the note was discovered from private logs
// env.advance_block_by(1);
env.advance_block_by(1);
sync_notes();
let notes: BoundedVec<ValueNote, MAX_NOTES_PER_PAGE> =
view_notes(owner_storage_slot, options);
Expand All @@ -213,7 +210,7 @@ pub contract Counter {
assert(notes.len() == 4);

// Checking that the note was discovered from private logs
// env.advance_block_by(1);
env.advance_block_by(1);
sync_notes();
let notes: BoundedVec<ValueNote, MAX_NOTES_PER_PAGE> =
view_notes(owner_storage_slot, options);
Expand Down