Skip to content

Commit

Permalink
0x0ece/features: make test fixtures work
Browse files Browse the repository at this point in the history
  • Loading branch information
jumpsiegel committed May 30, 2024
1 parent 15967f6 commit 995b49d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
10 changes: 0 additions & 10 deletions src/flamenco/features/fd_features_generated.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,6 @@ fd_feature_id_t const ids[] = {
/* 9bn2vTJUsUcnpiZWbu2woSKtTGW3ErZC9ERv88SDqQjK */
.name = "enable_partitioned_epoch_reward" },

{ .index = offsetof(fd_features_t, enable_partitioned_epoch_reward)>>3,
.id = {"\x2c\xcd\x49\xd1\x01\x45\x2d\x2e\x60\xc4\x6e\x4a\xe2\xe3\x4b\x6d\x5f\x33\xdc\x75\x97\x0d\x05\x15\x83\xa4\x96\xa7\x3a\x54\x06\x16"},
/* 41tVp5qR1XwWRt5WifvtSQyuxtqQWJgEK8w91AtBqSwP */
.name = "enable_partitioned_epoch_reward" },

{ .index = offsetof(fd_features_t, spl_token_v3_4_0)>>3,
.id = {"\xdd\x49\x17\x14\x26\x0f\xf1\xe8\xa1\x87\xe0\x3b\x4b\x80\x5d\xde\xd4\x52\xd3\x90\x4e\x14\x4c\xa2\xc5\x99\x39\x3f\x15\xf2\x37\x85"},
/* Ftok4njE8b7tDffYkC5bAbCaQv5sL6jispYrprzatUwN */
Expand Down Expand Up @@ -949,11 +944,6 @@ fd_feature_id_t const ids[] = {
/* tvcF6b1TRz353zKuhBjinZkKzjmihXmBAHJdjNYw1sQ */
.name = "timely_vote_credits" },

{ .index = offsetof(fd_features_t, timely_vote_credits)>>3,
.id = {"\x1a\xc7\x41\x11\xf0\x44\xfa\x86\x3f\x13\x7e\xa6\x7a\xb2\xd4\x6e\x16\x10\x57\xe6\x96\x23\x5f\x27\xa8\xe5\xf0\x4c\xe8\xf1\x65\x23"},
/* 2oXpeh141pPZCTCFHBsvCwG2BtaHZZAtrVhwaxSy6brS */
.name = "timely_vote_credits" },

{ .index = offsetof(fd_features_t, remaining_compute_units_syscall_enabled)>>3,
.id = {"\x42\x53\x93\xd7\x86\x52\x20\x64\xce\x96\x67\x76\xc0\xb2\x3d\xd2\xe4\xd2\x81\x04\x5e\x7a\xd6\x90\xee\x30\x77\x01\x6a\x54\x6e\x64"},
/* 5TuppMutoyzhUSfuYdhgzD47F92GL1g89KpCZQKqedxP */
Expand Down
24 changes: 12 additions & 12 deletions src/flamenco/features/gen_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ def pubkey_to_c_array(pubkey):
if x.get("hardcoded") == 1:
print(f",\n .hardcoded = 1", file=body, end="")
print(" },\n", file=body)
if "old" in x:
print(
f''' {{ .index = offsetof(fd_features_t, {x["name"]})>>3,
.id = {{{pubkey_to_c_array(x["old"])}}},
/* {x["old"]} */
.name = "{x["name"]}"''',
file=body,
end="",
)
if x.get("hardcoded") == 1:
print(f",\n .hardcoded = 1", file=body, end="")
print(" },\n", file=body)
# if "old" in x:
# print(
# f''' {{ .index = offsetof(fd_features_t, {x["name"]})>>3,
# .id = {{{pubkey_to_c_array(x["old"])}}},
# /* {x["old"]} */
# .name = "{x["name"]}"''',
# file=body,
# end="",
# )
# if x.get("hardcoded") == 1:
# print(f",\n .hardcoded = 1", file=body, end="")
# print(" },\n", file=body)

print(
f""" {{ .index = ULONG_MAX }}
Expand Down

0 comments on commit 995b49d

Please sign in to comment.