Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Fix: Read from the db in order to find the existence of spent-addresses #1540

Merged
merged 4 commits into from
Jul 25, 2019

Conversation

GalRogozinski
Copy link
Contributor

Description

We now check the existence of spent-addresses by properly reading from the db rather then looking for sst files. We do it when we load from local snapshot and when we are not it testnet mode.

Fixes #1461

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How Has This Been Tested?

  • Tested manually on a local node
  • Unit test was added

Checklist:

  • My code follows the style guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@@ -48,10 +55,10 @@

@Before
public void setUp() throws Exception {
Mockito.when(config.isTestnet()).thenReturn(true);
when(config.isTestnet()).thenReturn(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When adding when for the new test, this changed automatically as well.

@GalRogozinski GalRogozinski requested a review from kwek20 July 25, 2019 13:33
Copy link
Contributor

@kwek20 kwek20 left a comment

Choose a reason for hiding this comment

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

Nice! Seems good, lets get this merged!

@GalRogozinski GalRogozinski merged commit ccae89b into iotaledger:dev Jul 25, 2019
@jakubcech jakubcech mentioned this pull request Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We check for the existence of spent-addresses-db by looking for sst files
2 participants