Skip to content

Conversation

@zeusoo001
Copy link
Contributor

@zeusoo001 zeusoo001 commented Jun 20, 2025

What does this PR do?
Optimize the log for configuration without Blackhole account. Fixes #6299

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@zeusoo001 zeusoo001 changed the title feat(config): optimize the log for configuration without Blackhole account feat(config): optimize log for config without Blackhole account Jun 25, 2025
@kuny0707 kuny0707 moved this to In Review in java-tron Jun 30, 2025
@barbatos2011
Copy link

Hi, please resolve the conflicts

@zeusoo001 zeusoo001 force-pushed the blackhole-log-opt branch from 13a276c to d7715c7 Compare July 10, 2025 03:54
assertsAddress.put(accountName, address);
}
if (assertsAddress.get(ACCOUNT_BLACKHOLE) == null) {
throw new TronError("Account[Blackhole] is not configured.", TronError.ErrCode.GENESIS_BLOCK_INIT);
Copy link
Contributor

Choose a reason for hiding this comment

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

use ACCOUNT_BLACKHOLE instead of Blackhole?

Copy link
Contributor

Choose a reason for hiding this comment

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

Because this process occurs when the genesis block is being initialized

AccountStore.setAccount(config);
Assert.fail();
} catch (Throwable e) {
Assert.assertTrue(e instanceof TronError);
Copy link
Contributor

Choose a reason for hiding this comment

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

add Assert.assertEquals("Account[Blackhole] is not configured.", e.getMessage());?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is enough to judge the exception type, which is mainly functional testing rather than specific log information comparison.

@kuny0707 kuny0707 merged commit b730030 into tronprotocol:release_v4.8.1 Aug 7, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in java-tron Aug 7, 2025
@zeusoo001 zeusoo001 deleted the blackhole-log-opt branch November 5, 2025 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Private node fails to start without Blackhole configured in config.conf

9 participants