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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checker for no transaction cost #3158

Open
wants to merge 8 commits into
base: sprint-1.14
Choose a base branch
from

Conversation

shohan2001
Copy link
Collaborator

Fixes : #3115

Changes

Need to be mentioned in CHANGELOG.md?

Tests

Tasks to complete before merging PR:

  • Ensure system tests are passing. If not Run them manually to check for any regressions 馃搵
  • Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
  • Merge your system tests PR to master AFTER merging this PR

Associated PRs (Link as appropriate):

  • blobber:
  • gosdk:
  • system_test:
  • zboxcli:
  • zwalletcli:
  • Other: ...

@@ -1171,6 +1176,10 @@ func (mc *Chain) generateBlock(ctx context.Context, b *block.Block,
logging.Logger.Debug("Bad transaction cost", zap.Error(err), zap.String("txn_hash", txn.Hash))
break
}
if cost == math.MaxInt {
logging.Logger.Debug("No transaction cost", zap.Error(err), zap.String("txn_hash", txn.Hash))
return common.NewError(NoTransactionCost, fmt.Sprintf("No transaction cost for txn %v", txn.Hash))
Copy link
Member

Choose a reason for hiding this comment

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

we need to break here as we do in other places

@shohan2001 shohan2001 marked this pull request as draft February 29, 2024 11:18
@shohan2001 shohan2001 marked this pull request as ready for review March 5, 2024 12:38
@dabasov dabasov added the v1.14 label Mar 11, 2024
@dabasov dabasov changed the base branch from staging to sprint-1.14 March 11, 2024 19:47
Copy link
Member

@dabasov dabasov left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overflow on transaction execution without cost
2 participants