Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: trace file template (#277) #278

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/exporters/besu_trace_columns.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static List<ColumnHeader> headers(int length) {
return headers;
}

public Trace(List<MappedByteBuffer> buffers) {
public {{ class }} (List<MappedByteBuffer> buffers) {
{{ #each registers }}
this.{{ java_name }} = buffers.get({{ @index }});
{{ /each }}
Expand All @@ -66,7 +66,7 @@ public int size() {
}

{{#each columns}}
public Trace {{ this.appender }}(final {{ this.tupe }} b) {
public {{ class }} {{ this.appender }}(final {{ this.tupe }} b) {
if (filled.get({{ this.reg_id }})) {
throw new IllegalStateException("{{ this.corset_name }} already set");
} else {
Expand All @@ -79,7 +79,7 @@ public int size() {
}

{{/each}}
public Trace validateRow() {
public {{ class }} validateRow() {
{{#each registers}}
if (!filled.get({{ this.id }})) {
throw new IllegalStateException("{{ this.corset_name }} has not been filled");
Expand All @@ -92,7 +92,7 @@ public Trace validateRow() {
return this;
}

public Trace fillAndValidateRow() {
public {{ class }} fillAndValidateRow() {
{{#each registers}}
if (!filled.get({{ this.id }})) {
{{ this.java_name }}.position({{ this.java_name }}.position() + {{ this.bytes_width }});
Expand Down
Loading