feat(config): optimize log for config without Blackhole account by zeusoo001 · Pull Request #6356 · tronprotocol/java-tron

@zeusoo001

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

@kuny0707 kuny0707 linked an issue

Jun 23, 2025

that may be closed by this pull request

halibobo1205

kuny0707

@zeusoo001

@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

barbatos2011

@barbatos2011

Hi, please resolve the conflicts

bladehan1

@zeusoo001

CodeNinjaEvan

waynercheung

assertsAddress.put(accountName, address);
}
if (assertsAddress.get(ACCOUNT_BLACKHOLE) == null) {
throw new TronError("Account[Blackhole] is not configured.", TronError.ErrCode.GENESIS_BLOCK_INIT);

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?

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);

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());?

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.

lvs0075