Skip to content

Fix override state when UpdateTRC21Fee#526

Open
vienlnn wants to merge 20 commits into
BuildOnViction:masterfrom
vienlnn:fix_override_state_trc21
Open

Fix override state when UpdateTRC21Fee#526
vienlnn wants to merge 20 commits into
BuildOnViction:masterfrom
vienlnn:fix_override_state_trc21

Conversation

@vienlnn
Copy link
Copy Markdown
Contributor

@vienlnn vienlnn commented Jun 2, 2025

No description provided.

Comment thread core/state/trc21_reader.go Outdated

func UpdateTRC21Fee(statedb *StateDB, newBalance map[common.Address]*big.Int, totalFeeUsed *big.Int) {
if statedb == nil || len(newBalance) == 0 {
func UpdateTRC21Fee(statedb *StateDB, usedBalance map[common.Address]*big.Int, totalFeeUsed *big.Int) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we calculate totalFeeUsed inside of UpdateTRC21Fee function

@tungng98
Copy link
Copy Markdown
Collaborator

tungng98 commented Jun 4, 2025

At the current state, the PR will break the chain. It needs a hard fork to separate the logic before the fix and after the fix.

@imduchuyyy
Copy link
Copy Markdown
Contributor

Is this identical to the pull request at #530?

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