You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/04/07 12:43:57 UTC
[camel] branch main updated: CAMEL-17922: Fix default value supplier for header MIX_DIGEST (#7385)
This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 0b6a02ac7da CAMEL-17922: Fix default value supplier for header MIX_DIGEST (#7385)
0b6a02ac7da is described below
commit 0b6a02ac7da71a8e0feb6aba8b58a5e55133a070
Author: Nicolas Filotto <es...@users.noreply.github.com>
AuthorDate: Thu Apr 7 14:43:52 2022 +0200
CAMEL-17922: Fix default value supplier for header MIX_DIGEST (#7385)
## Motivation
The default value supplier of the header MIX_DIGEST is the value of the option headerPowHash while we would rather expect mixDigest.
## Modifications
* Set the proper method name as default value supplier
---
.../src/main/java/org/apache/camel/component/web3j/Web3jProducer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jProducer.java b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jProducer.java
index 2e8555fdd74..ae399824d78 100644
--- a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jProducer.java
+++ b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jProducer.java
@@ -730,7 +730,7 @@ public class Web3jProducer extends HeaderSelectorProducer {
void ethSubmitWork(Message message) throws IOException {
String nonce = message.getHeader(Web3jConstants.NONCE, configuration::getNonce, String.class);
String headerPowHash = message.getHeader(Web3jConstants.HEADER_POW_HASH, configuration::getHeaderPowHash, String.class);
- String mixDigest = message.getHeader(Web3jConstants.MIX_DIGEST, configuration::getHeaderPowHash, String.class);
+ String mixDigest = message.getHeader(Web3jConstants.MIX_DIGEST, configuration::getMixDigest, String.class);
Request<?, EthSubmitWork> request = web3j.ethSubmitWork(nonce, headerPowHash, mixDigest);
setRequestId(message, request);
EthSubmitWork response = request.send();