From 995b49de7010365ec3f3c3a6ba842457b1636de1 Mon Sep 17 00:00:00 2001 From: Josh Siegel Date: Thu, 30 May 2024 11:17:07 +0000 Subject: [PATCH] 0x0ece/features: make test fixtures work --- src/flamenco/features/fd_features_generated.c | 10 -------- src/flamenco/features/gen_features.py | 24 +++++++++---------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/src/flamenco/features/fd_features_generated.c b/src/flamenco/features/fd_features_generated.c index 6ea58c0ce2..659b818305 100644 --- a/src/flamenco/features/fd_features_generated.c +++ b/src/flamenco/features/fd_features_generated.c @@ -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 */ @@ -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 */ diff --git a/src/flamenco/features/gen_features.py b/src/flamenco/features/gen_features.py index 47f16bf415..2982c8e519 100755 --- a/src/flamenco/features/gen_features.py +++ b/src/flamenco/features/gen_features.py @@ -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 }}