Skip to content

Commit

Permalink
minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoff Ramseyer committed Mar 19, 2024
1 parent 691d652 commit d06e042
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 55 deletions.
45 changes: 0 additions & 45 deletions tests/storage_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,10 @@ TEST_CASE("int64 storage write", "[storage]")

auto check_valid = [&](const Hash& tx_hash) {
REQUIRE(block_context->tx_set.contains_tx(tx_hash));
// REQUIRE(
// tx_block->is_valid(TransactionFailurePoint::FINAL, tx_hash));
};

auto check_invalid = [&](const Hash& tx_hash) {
REQUIRE(!block_context->tx_set.contains_tx(tx_hash));

// REQUIRE(
// !tx_block->is_valid(TransactionFailurePoint::FINAL, tx_hash));
};

SECTION("write to empty slot")
Expand Down Expand Up @@ -506,8 +501,6 @@ TEST_CASE("raw mem storage write", "[storage]")
finish_block();

require_valid(tx_hash);
// REQUIRE(
// tx_block->is_valid(TransactionFailurePoint::FINAL, tx_hash));

auto hk0 = make_key(h, k0);

Expand Down Expand Up @@ -551,8 +544,6 @@ TEST_CASE("raw mem storage write", "[storage]")
finish_block();

require_valid(tx_hash);
// REQUIRE(
// tx_block->is_valid(TransactionFailurePoint::FINAL, tx_hash));

auto hk0 = make_key(h, k0);

Expand All @@ -565,37 +556,6 @@ TEST_CASE("raw mem storage write", "[storage]")
0x10, 0x00, 0xF0, 0xE0, 0xD0, 0xC0, 0xB0, 0xA0 });
}

/*
SECTION("delete_first key solo")
{
calldata_0 data {
.key = k0
};
TransactionInvocation invocation (
h,
4,
test::make_calldata(data)
);
auto [tx_hash, tx] = make_transaction(a0,
invocation);
exec_success(tx_hash, tx);
finish_block();
REQUIRE(
tx_block->is_valid(TransactionFailurePoint::FINAL,
tx_hash));
auto hk0 = make_key(h, k0);
auto db_val = state_db.get_committed_value(hk0);
REQUIRE(!db_val);
} */

SECTION("delete_last key solo")
{
calldata_0 data{ .key = k0 };
Expand Down Expand Up @@ -641,11 +601,6 @@ TEST_CASE("raw mem storage write", "[storage]")

require_valid(tx_hash);
require_valid(tx_hash2);
// REQUIRE(
// tx_block->is_valid(TransactionFailurePoint::FINAL, tx_hash));
// REQUIRE(
// tx_block->is_valid(TransactionFailurePoint::FINAL,
//tx_hash2));

auto hk0 = make_key(h, k0);

Expand Down
10 changes: 0 additions & 10 deletions xdr/transaction.x
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ enum TransactionStatus
//TODO other statuses
};

// validity check: flip bit <phase_num> if you fail
// validation in phase <phase_num>.
// valid in phase (phase_num) if (validity bits) <= phase_enum
enum TransactionFailurePoint
{
COMPUTE = 0x40000000,
CONFLICT_PHASE_1 = 0x20000000,
FINAL = 0
};

struct TransactionInvocation
{
Address invokedAddress;
Expand Down

0 comments on commit d06e042

Please sign in to comment.