Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set transaction TTL based on time with shelly date fallback #286

Closed
wants to merge 2 commits into from

Conversation

matiwinnetou
Copy link
Contributor

No description provided.

@matiwinnetou matiwinnetou changed the title fix: fix issue with incorrect transaction size. fix: set fake / default transaction TTL on preprocess endpoint Feb 18, 2025
@linconvidal
Copy link
Member

Tried building, but when I start the stack again, I’m getting this error:

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'httpConfig': Unsatisfied dependency expressed 
through field 'httpConnectTimeoutSeconds': Failed to convert value of type 
'java.lang.String' to required type 'int'; For input string: ""
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:787) ~[spring-beans-6.1.5.jar!/:6.1.5]
    ...
Caused by: org.springframework.beans.TypeMismatchException: 
Failed to convert value of type 'java.lang.String' to required type 'int'; 
For input string: ""
    at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:87) ~[spring-beans-6.1.5.jar!/:6.1.5]
    ...
Caused by: java.lang.NumberFormatException: For input string: ""
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[na:na]
    at java.base/java.lang.Integer.parseInt(Integer.java:672) ~[na:na]
    ...

I haven’t changed anything else. It was a preview instance, fully synced. I just checked out to the PR, built it, and put it up.

@matiwinnetou matiwinnetou force-pushed the bug-fix-tx-size-calculation-issue-277 branch from 7b9e992 to 109ec9c Compare February 19, 2025 09:15
@matiwinnetou
Copy link
Contributor Author

The issue you are facing is unrelated to the PR itself.

@matiwinnetou matiwinnetou force-pushed the bug-fix-tx-size-calculation-issue-277 branch 15 times, most recently from 355f64c to 191a75d Compare February 20, 2025 15:42
@matiwinnetou matiwinnetou marked this pull request as ready for review February 20, 2025 15:51
@matiwinnetou matiwinnetou changed the title fix: set fake / default transaction TTL on preprocess endpoint fix: set transaction TTL based on time with shelly date fallback Feb 20, 2025
@matiwinnetou matiwinnetou force-pushed the bug-fix-tx-size-calculation-issue-277 branch 7 times, most recently from 941a551 to f96c634 Compare February 20, 2025 16:52
@matiwinnetou matiwinnetou force-pushed the bug-fix-tx-size-calculation-issue-277 branch 6 times, most recently from 5cead0c to d14b2a6 Compare February 20, 2025 18:50
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Member

@Kammerlo Kammerlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good!
Except the sonar issues, but it marked the same like I did. Autowire, unused imports and a public modifier in a test class. So just minor stuff.

@@ -29,6 +31,7 @@
"org.cardanofoundation.rosetta.api.common.model.entity"})
@OpenAPIDefinition(info = @Info(title = "APIs", version = "1.0", description = "Rosetta APIs v1.0"))
@EnableScheduling
@Slf4j
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed here.

@Slf4j
public class OfflineSlotServiceImpl implements OfflineSlotService {

@Autowired
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do use Autowire here and not constructor injection?

protected CardanoConverters cardanoConverters;

@Override
public long getCurrentSlotBasedOnTime() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a nice solution to estimate the solution. I like it!

@matiwinnetou matiwinnetou marked this pull request as draft February 21, 2025 08:15
@matiwinnetou matiwinnetou force-pushed the bug-fix-tx-size-calculation-issue-277 branch 10 times, most recently from d6bf005 to 38e5a6d Compare February 25, 2025 16:02
@matiwinnetou matiwinnetou force-pushed the bug-fix-tx-size-calculation-issue-277 branch 4 times, most recently from c5c9067 to bc5de7a Compare February 25, 2025 22:02
@matiwinnetou matiwinnetou force-pushed the bug-fix-tx-size-calculation-issue-277 branch from bc5de7a to ddaef4f Compare February 25, 2025 22:05
@matiwinnetou matiwinnetou deleted the bug-fix-tx-size-calculation-issue-277 branch February 26, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants