Skip to content

Commit

Permalink
Merge branch 'main' into fix_tuweni_references
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme authored Aug 20, 2023
2 parents 776f768 + fa04041 commit 58a851f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 21 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
jobs:
assemble:
timeout-minutes: 30
runs-on: [ self-hosted, Linux ]
runs-on: ubuntu-latest
container:
image: tmio/tuweni-build:1.2
steps:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
key: ${{ runner.os }}-build-${{ github.sha }}
test:
timeout-minutes: 30
runs-on: [ self-hosted, Linux ]
runs-on: ubuntu-latest
needs: assemble
container:
image: tmio/tuweni-build:1.2
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [Linux, Windows]
os: [ubuntu-latest, windows-latest]
needs: assemble
steps:
- name: Download distsrc
Expand All @@ -103,10 +103,10 @@ jobs:
with:
name: distsrc
- name: Unzip source
if: ${{ matrix.os == 'Linux' }}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: unzip -q -o - tuweni-src-*.zip -d distunzipped
- name: Unzip source
if: ${{ matrix.os == 'Windows' }}
if: ${{ matrix.os == 'windows-latest' }}
run: Expand-Archive -Force -Path tuweni-src-*.zip -DestinationPath distunzipped
- name: Rename folder
run: mv distunzipped/tuweni-src-* distunzipped/tuweni
Expand All @@ -124,7 +124,7 @@ jobs:
run: cd distunzipped/tuweni && ./gradlew.bat assemble
integration-tests:
timeout-minutes: 30
runs-on: [ self-hosted, Linux ]
runs-on: ubuntu-latest
needs: assemble
container:
image: tmio/tuweni-build:1.2
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
referenceTests:
timeout-minutes: 30
needs: assemble
runs-on: [ self-hosted, Linux ]
runs-on: ubuntu-latest
container:
image: tmio/tuweni-build:1.2
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ssb-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
jobs:
integration-tests:
timeout-minutes: 30
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
services:
ssb:
image: tmio/ssb-server-docker:latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
jobs:
test-windows:
timeout-minutes: 30
runs-on: [self-hosted, Windows]
runs-on: windows-latest
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push') }}
steps:
- uses: actions/checkout@v3
Expand Down
19 changes: 7 additions & 12 deletions eth/src/main/java/org/apache/tuweni/eth/EthJsonModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import org.jetbrains.annotations.Nullable;

public class EthJsonModule extends SimpleModule {

Expand Down Expand Up @@ -216,20 +215,16 @@ static class TransactionDeserializer extends StdDeserializer<Transaction> {
}

@Override
public Transaction deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException {
public Transaction deserialize(JsonParser p, DeserializationContext ctxt)
throws IOException, JacksonException {
JsonTransaction jt = p.readValueAs(JsonTransaction.class);
SECP256K1.Signature signature = SECP256K1.Signature.create(jt.v.get(0), jt.r.toUnsignedBigInteger(), jt.s.toUnsignedBigInteger());
SECP256K1.Signature signature =
SECP256K1.Signature.create(
jt.v.get(0), jt.r.toUnsignedBigInteger(), jt.s.toUnsignedBigInteger());

return new Transaction(jt.nonce,
jt.gasPrice,
jt.gas,
jt.to,
jt.value,
jt.input,
jt.chainId,
signature);
return new Transaction(
jt.nonce, jt.gasPrice, jt.gas, jt.to, jt.value, jt.input, jt.chainId, signature);
}

}

static class UInt256Serializer extends StdSerializer<UInt256> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class DownloaderTest {
start=10
end=20
url="example.com"
numberOfThreads=2
""".trimIndent(),
)
val downloader = Downloader(vertx, config, Dispatchers.Default)
Expand Down

0 comments on commit 58a851f

Please sign in to comment.