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

RFS-174 Performance improvement in getLowestBlock() #551

Merged
merged 1 commit into from
May 9, 2018

Conversation

pmprete
Copy link

@pmprete pmprete commented May 9, 2018

Move call to getLowestBlock() to getBtcBlockchainBlockLocator() where its used to avoid calling it if its not mandatory

… its used to avoid calling it if its not mandatory
@pmprete pmprete changed the title RFS-174 - performance improvement in getLowestBlock() Performance improvement in getLowestBlock() May 9, 2018
@pmprete pmprete changed the title Performance improvement in getLowestBlock() RFS-174 Performance improvement in getLowestBlock() May 9, 2018
Copy link
Contributor

@colltoaction colltoaction left a comment

Choose a reason for hiding this comment

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

:shipit:

@pmprete pmprete requested review from lsebrie and amendelzon May 9, 2018 14:46
@rskops
Copy link
Collaborator

rskops commented May 9, 2018

SonarQube analysis reported 65 issues

  • CRITICAL 5 critical
  • MAJOR 36 major
  • MINOR 8 minor
  • INFO 16 info

Top 10 issues

  1. CRITICAL BridgeSupport.java#L335: Method co.rsk.peg.BridgeSupport.registerBtcTransaction(Transaction, byte[], int, byte[]) passes a concatenated string to SLF4J's format string rule
  2. CRITICAL BridgeSupport.java#L343: Method co.rsk.peg.BridgeSupport.registerBtcTransaction(Transaction, byte[], int, byte[]) passes a concatenated string to SLF4J's format string rule
  3. CRITICAL BridgeSupport.java#L356: Method co.rsk.peg.BridgeSupport.registerBtcTransaction(Transaction, byte[], int, byte[]) passes a concatenated string to SLF4J's format string rule
  4. CRITICAL BridgeSupport.java#L372: Method co.rsk.peg.BridgeSupport.registerBtcTransaction(Transaction, byte[], int, byte[]) passes a concatenated string to SLF4J's format string rule
  5. CRITICAL BridgeSupport.java#L847: Remove this unused method parameter "executionBlockNumber". rule
  6. MAJOR BridgeSupport.java#: This file has 1,184 lines, which is greater than 1,000 authorized. Split it into smaller files. rule
  7. MAJOR BridgeSupport.java#L213: Method co.rsk.peg.BridgeSupport.getCheckPoints() appears to call the same method on the same object redundantly rule
  8. MAJOR BridgeSupport.java#L308: The Cyclomatic Complexity of this method "registerBtcTransaction" is 16 which is greater than 10 authorized. rule
  9. MAJOR BridgeSupport.java#L429: Method co.rsk.peg.BridgeSupport.registerBtcTransaction(Transaction, byte[], int, byte[]) calls String.format on a static (non parameterized) format string rule
  10. MAJOR BridgeSupport.java#L429: Format-string method String.format(String, Object[]) called with format string "whitelist money return tx build for btc tx {} error. Return was to {}. Tx {}. Value {}" wants 0 arguments but is given 4 in co.rsk.peg.BridgeSupport.registerBtcTransaction(Transaction, byte[], int, byte[]) rule

@pmprete pmprete merged commit 8223b24 into 0.4.2-fix May 9, 2018
@pmprete pmprete deleted the 0.4.2-move-getLowestBlock branch May 11, 2018 15:12
@aeidelman aeidelman added this to the Bamboo v0.4.3 milestone Jun 8, 2018
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.

4 participants