Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wurdum committed Feb 12, 2025
1 parent 019bcb9 commit 719e15e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ private static IEnumerable<TestCaseData> TraceBlockSource()
"id": 67
}
"""
) { TestName = "Contract with blockMemoryTracer" };
)
{ TestName = "Contract with blockMemoryTracer" };

yield return new TestCaseData(
transactions,
Expand All @@ -199,7 +200,8 @@ private static IEnumerable<TestCaseData> TraceBlockSource()
"id": 67
}
"""
) { TestName = "Contract with javaScriptTracer" };
)
{ TestName = "Contract with javaScriptTracer" };

yield return new TestCaseData(
transactions,
Expand All @@ -224,7 +226,8 @@ private static IEnumerable<TestCaseData> TraceBlockSource()
"id": 67
}
"""
) { TestName = "Contract with " + Native4ByteTracer.FourByteTracer };
)
{ TestName = "Contract with " + Native4ByteTracer.FourByteTracer };

yield return new TestCaseData(
transactions,
Expand Down Expand Up @@ -283,7 +286,8 @@ private static IEnumerable<TestCaseData> TraceBlockSource()
"id": 67
}
"""
) { TestName = "Contract with " + NativeCallTracer.CallTracer };
)
{ TestName = "Contract with " + NativeCallTracer.CallTracer };

yield return new TestCaseData(
transactions,
Expand Down Expand Up @@ -338,7 +342,8 @@ private static IEnumerable<TestCaseData> TraceBlockSource()
"id": 67
}
"""
) { TestName = "Contract with " + NativePrestateTracer.PrestateTracer };
)
{ TestName = "Contract with " + NativePrestateTracer.PrestateTracer };
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,22 @@ private static IEnumerable<TestCaseData> TraceTransactionTransferSource()
transferTransaction,
new GethTraceOptions(),
"""{"jsonrpc":"2.0","result":{"gas":21000,"failed":false,"returnValue":"","structLogs":[]},"id":67}"""
) { TestName = "Transfer with blockMemoryTracer" };
)
{ TestName = "Transfer with blockMemoryTracer" };

yield return new TestCaseData(
transferTransaction,
new GethTraceOptions { Tracer = "{gasUsed: [], step: function(log) { this.gasUsed.push(log.getGas()); }, result: function() { return this.gasUsed; }, fault: function(){}}" },
"""{"jsonrpc":"2.0","result":[],"id":67}"""
) { TestName = "Transfer with javaScriptTracer" };
)
{ TestName = "Transfer with javaScriptTracer" };

yield return new TestCaseData(
transferTransaction,
new GethTraceOptions { Tracer = Native4ByteTracer.FourByteTracer },
"""{"jsonrpc":"2.0","result":{},"id":67}"""
) { TestName = "Transfer with " + Native4ByteTracer.FourByteTracer };
)
{ TestName = "Transfer with " + Native4ByteTracer.FourByteTracer };

yield return new TestCaseData(
transferTransaction,
Expand All @@ -151,7 +154,8 @@ private static IEnumerable<TestCaseData> TraceTransactionTransferSource()
"id": 67
}
"""
) { TestName = "Transfer with " + NativeCallTracer.CallTracer };
)
{ TestName = "Transfer with " + NativeCallTracer.CallTracer };

yield return new TestCaseData(
transferTransaction,
Expand All @@ -175,7 +179,8 @@ private static IEnumerable<TestCaseData> TraceTransactionTransferSource()
"id": 67
}
"""
) { TestName = "Transfer with " + NativePrestateTracer.PrestateTracer };
)
{ TestName = "Transfer with " + NativePrestateTracer.PrestateTracer };
}

private static IEnumerable<TestCaseData> TraceTransactionContractSource()
Expand Down Expand Up @@ -255,19 +260,22 @@ private static IEnumerable<TestCaseData> TraceTransactionContractSource()
"id": 67
}
"""
) { TestName = "Contract with blockMemoryTracer" };
)
{ TestName = "Contract with blockMemoryTracer" };

yield return new TestCaseData(
contractTransaction,
new GethTraceOptions { Tracer = "{gasUsed: [], step: function(log) { this.gasUsed.push(log.getGas()); }, result: function() { return this.gasUsed; }, fault: function(){}}" },
"""{"jsonrpc":"2.0","result":[46928,46925,46922,44722],"id":67}"""
) { TestName = "Contract with javaScriptTracer" };
)
{ TestName = "Contract with javaScriptTracer" };

yield return new TestCaseData(
contractTransaction,
new GethTraceOptions { Tracer = Native4ByteTracer.FourByteTracer },
"""{"jsonrpc":"2.0","result":{"0x60006020-2":1},"id":67}"""
) { TestName = "Contract with " + Native4ByteTracer.FourByteTracer };
)
{ TestName = "Contract with " + Native4ByteTracer.FourByteTracer };

yield return new TestCaseData(
contractTransaction,
Expand All @@ -287,7 +295,8 @@ private static IEnumerable<TestCaseData> TraceTransactionContractSource()
"id": 67
}
"""
) { TestName = "Contract with " + NativeCallTracer.CallTracer };
)
{ TestName = "Contract with " + NativeCallTracer.CallTracer };

yield return new TestCaseData(
contractTransaction,
Expand All @@ -314,6 +323,7 @@ private static IEnumerable<TestCaseData> TraceTransactionContractSource()
"id": 67
}
"""
) { TestName = "Contract with " + NativePrestateTracer.PrestateTracer };
)
{ TestName = "Contract with " + NativePrestateTracer.PrestateTracer };
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void KeepHinting(Guid guid, int start)
{
hintBasedCache.Hint(guid, i, i + 120000);
}
};
}

Task a = new(() => KeepHinting(_guidA, 100000));
Task b = new(() => KeepHinting(_guidB, 0));
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Runner/Ethereum/JsonRpcRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public async Task Start(CancellationToken cancellationToken)
foreach (var plugin in _api.Plugins.OfType<INethermindServicesPlugin>())
{
plugin.AddServices(s);
};
}
})
.UseStartup<Startup>()
.UseUrls(urls)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static object[] MakeTestData(Dictionary<int, int[]> txs, int[] localAccounts, ul
maxBytesPerTxList,
maxTransactionsLists
];
};
}

yield return new TestCaseData(args: MakeTestData(new Dictionary<int, int[]> { { 1, [1] }, { 2, [2] }, { 3, [3] } }, [], 2 * Transaction.BaseTxGasCost, 1000, 2))
{
Expand Down

0 comments on commit 719e15e

Please sign in to comment.