BlockElaborator bugfix
This commit is contained in:
@@ -8,8 +8,6 @@ import org.slf4j.LoggerFactory;
|
||||
import org.web3j.protocol.Web3j;
|
||||
import org.web3j.protocol.core.DefaultBlockParameterNumber;
|
||||
import org.web3j.protocol.core.methods.response.EthBlock;
|
||||
import org.web3j.tx.ReadonlyTransactionManager;
|
||||
import org.web3j.tx.gas.DefaultGasProvider;
|
||||
import stream.dto.BlockHash;
|
||||
import stream.dto.BlockId;
|
||||
import stream.dto.BlockNumber;
|
||||
@@ -28,8 +26,6 @@ public class BlockElaborator extends RichAsyncFunction<BlockId, EthBlock> {
|
||||
public void open(OpenContext openContext) throws Exception {
|
||||
Map<String, String> params = getRuntimeContext().getGlobalJobParameters();
|
||||
w3 = Web3Client.get(params);
|
||||
gasProvider = new DefaultGasProvider();
|
||||
transactionManager = new ReadonlyTransactionManager(w3, "0x1234000000000000000000000000000000001234");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -39,7 +35,7 @@ public class BlockElaborator extends RichAsyncFunction<BlockId, EthBlock> {
|
||||
return getBlock(blockId);
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to get block {} on chain {}", blockId, e);
|
||||
throw new RuntimeException("Error processing token: " + address, e);
|
||||
throw new RuntimeException("Error processing block " + blockId, e);
|
||||
}
|
||||
}).thenAccept(result -> resultFuture.complete(Collections.singleton(result)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user