Skip to content

Commit aae79fc

Browse files
committed
fix:refine example nonce
Signed-off-by: grapebaba <281165273@qq.com>
1 parent c27c25e commit aae79fc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

example/bundle/RpcMevSimBundle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static void main(String[] args) throws IOException, ExecutionException, I
7373
.getTransactionCount();
7474
final String to = "0x56EdF679B0C80D528E17c5Ffe514dc9a1b254b9c";
7575
RawTransaction rawTransaction = RawTransaction.createEtherTransaction(
76-
nonce.add(BigInteger.ONE),
76+
nonce,
7777
web3j.ethGasPrice().send().getGasPrice(),
7878
DefaultGasProvider.GAS_LIMIT,
7979
to,

src/main/java/net/flashbots/provider/HttpProvider.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ public <T> CompletableFuture<T> send(
163163
return future;
164164
})
165165
.exceptionallyCompose(throwable -> {
166+
if (throwable instanceof MevShareApiException) {
167+
future.completeExceptionally(throwable);
168+
return future;
169+
}
166170
MevShareApiException e = new MevShareApiException(throwable);
167171
future.completeExceptionally(e);
168172
return future;

0 commit comments

Comments
 (0)