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

feature(rpc): add fixed values to getblocktemplate response #5558

Merged
merged 10 commits into from
Nov 8, 2022
Merged

Conversation

oxarbitrage
Copy link
Contributor

Motivation

Close #5452

Solution

Add constants where needed, get constant from other crates, update tests.

Review

Anyone can review.

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
  • How do you know it works? Does it have tests?

@oxarbitrage oxarbitrage requested a review from a team as a code owner November 4, 2022 23:45
@oxarbitrage oxarbitrage requested review from dconnolly and removed request for a team November 4, 2022 23:45
@github-actions github-actions bot added C-bug Category: This is a bug C-feature Category: New features labels Nov 4, 2022
@codecov
Copy link

codecov bot commented Nov 5, 2022

Codecov Report

Merging #5558 (100daa2) into main (75f83fc) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5558      +/-   ##
==========================================
+ Coverage   78.84%   78.87%   +0.02%     
==========================================
  Files         305      305              
  Lines       38126    38127       +1     
==========================================
+ Hits        30061    30071      +10     
+ Misses       8065     8056       -9     

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

I have a suggestion in PR #5559, and it will help me to review if we add documentation for the new fields.

@teor2345
Copy link
Contributor

teor2345 commented Nov 7, 2022

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Nov 7, 2022

update

✅ Branch has been successfully updated

@teor2345
Copy link
Contributor

teor2345 commented Nov 7, 2022

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Nov 7, 2022

update

✅ Branch has been successfully updated

mergify bot and others added 2 commits November 7, 2022 05:14
* Avoid using lazy_static

* Add some missing documentation

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@teor2345
Copy link
Contributor

teor2345 commented Nov 7, 2022

This PR has conflicts with PR #5554, which just merged. So it will need to be rebased or it will need a merge commit.

@oxarbitrage
Copy link
Contributor Author

The tests will fail because they all get into this code section

let coinbase_tx = if mempool_txs.is_empty() {

where everything is empty.

I am unsure if we should update the test and snapshots to be empty or if we should add the fixed values into that code as well.

@teor2345
Copy link
Contributor

teor2345 commented Nov 8, 2022

The tests will fail because they all get into this code section

let coinbase_tx = if mempool_txs.is_empty() {

where everything is empty.

I am unsure if we should update the test and snapshots to be empty or if we should add the fixed values into that code as well.

That code disappears in my next PR #5580, so you could base this PR on that one, or copy the fixed values into the code that is about to be deleted?

@teor2345 teor2345 added C-enhancement Category: This is an improvement A-rpc Area: Remote Procedure Call interfaces and removed C-bug Category: This is a bug C-feature Category: New features labels Nov 8, 2022
@github-actions github-actions bot added C-bug Category: This is a bug C-feature Category: New features labels Nov 8, 2022
@teor2345 teor2345 removed the request for review from dconnolly November 8, 2022 20:00
@teor2345 teor2345 added P-Medium ⚡ and removed C-bug Category: This is a bug C-feature Category: New features labels Nov 8, 2022
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

mergify bot added a commit that referenced this pull request Nov 8, 2022
@mergify mergify bot merged commit 4ccd074 into main Nov 8, 2022
@mergify mergify bot deleted the issue5452 branch November 8, 2022 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Area: Remote Procedure Call interfaces C-enhancement Category: This is an improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Populate Blocktemplate responses with fixed values data
2 participants