Use default steps when estimate Step fails
@@ -165,7 +165,12 @@ public class TransactionHandler {
}
public BigInteger estimateStep(Transaction transaction) throws IOException {
+ try {
return iconService.estimateStep(transaction).execute();
+ } catch (RpcError e) {
+ LOG.info("estimateStep failed(" + e.getCode() + ", " + e.getMessage() + "); use default steps.");
+ return Constants.DEFAULT_STEPS;
+ }
}
public RpcItem call(Call<RpcItem> call) throws IOException {
