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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(txpool, cmd, gtk): broadcast transactions with zero fee #1589

Merged
merged 5 commits into from
Nov 10, 2024

Conversation

b00f
Copy link
Collaborator

@b00f b00f commented Nov 9, 2024

Description

This PR ensures that transactions with zero fees can be broadcasted to the network, even if the tx-pool rejects them and the configuration does not accept zero-fee transactions.
This way, users can broadcast their transactions with zero fees, but their nodes will still drop them if they are deemed unacceptable.

This PR also refactored the txpool tests and simplify them.

@b00f b00f requested a review from Ja7ad November 9, 2024 08:44
Copy link

codecov bot commented Nov 10, 2024

Codecov Report

Attention: Patch coverage is 82.03125% with 23 lines in your changes missing coverage. Please review.

Project coverage is 76.21%. Comparing base (86a8ba9) to head (bf6d0e1).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1589      +/-   ##
==========================================
+ Coverage   75.07%   76.21%   +1.14%     
==========================================
  Files         234      236       +2     
  Lines       12156    18230    +6074     
==========================================
+ Hits         9126    13894    +4768     
- Misses       2582     3880    +1298     
- Partials      448      456       +8     

@b00f b00f changed the title fix(txpool, cmd, gui): broadcast transactions with zero fee fix(txpool, cmd, gtk): broadcast transactions with zero fee Nov 10, 2024
Copy link
Contributor

@Ja7ad Ja7ad left a comment

Choose a reason for hiding this comment

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

@b00f I think better check daily_limit <= 0 in BasicCheck

	if conf.Fee.DailyLimit <= 0 {
		return ConfigError{
			Reason: "dailyLimit can't be zero",
		}
	}

txpool/txpool_test.go Outdated Show resolved Hide resolved
@Ja7ad Ja7ad merged commit ca9820b into pactus-project:main Nov 10, 2024
12 checks passed
@Ja7ad Ja7ad added this to the v1.6.0 milestone Nov 10, 2024
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.

2 participants