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

Add generatetoaddress and estimatesmartfee RPC calls #1500

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

torkelrogstad
Copy link
Contributor

@torkelrogstad torkelrogstad commented Nov 26, 2019

Once this PR is merged I'll open up another PR for implementing the fundrawtransaction RPC call. It is implemented at arcanetechnology#2, but it needs EstimateSmartFeeMode from this PR for a clean backport.

return c.sendCmd(cmd)
}

// Generate generates numBlocks blocks to the given address and returns their hashes.
Copy link

@octobocto octobocto Dec 6, 2019

Choose a reason for hiding this comment

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

GenerateToAddress, not Generate

Copy link
Collaborator

Choose a reason for hiding this comment

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

Other than this looks good to go

@octobocto
Copy link

LGTM

@gitteri
Copy link

gitteri commented Feb 13, 2020

Can we get this merged in?

@lsharir
Copy link
Contributor

lsharir commented Feb 18, 2020

Agreed, need this too

@torkelrogstad
Copy link
Contributor Author

@Roasbeef this PR seems to be needed quite a bit by the community, Any chance of getting this in?

@jakesylvestre
Copy link
Collaborator

@jcvernaleo

  • high priority
  • feature

Copy link
Member

@jcvernaleo jcvernaleo left a comment

Choose a reason for hiding this comment

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

Just fix the one comment, squash and rebase, and then I will merge this in.

rpcclient/mining.go Outdated Show resolved Hide resolved
@torkelrogstad
Copy link
Contributor Author

I've squashed the commits and updated the comment. I also updated GenerateToAddress to take in a btcutil.Address instead of a string

Copy link
Member

@jcvernaleo jcvernaleo left a comment

Choose a reason for hiding this comment

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

OK

@jcvernaleo jcvernaleo merged commit 8b1be46 into btcsuite:master Mar 17, 2020
@Rjected Rjected mentioned this pull request May 12, 2020
@kepikoi
Copy link

kepikoi commented Jul 6, 2021

Why is estimatesmartfee not available via the JSON RPC API?

POST http://my-btcd:8334

{
    "jsonrpc": "2.0",
    "id": "xyz",
    "method": "estimatesmartfee",
    "params": [
        6
    ]
}
{
    "jsonrpc": "2.0",
    "result": null,
    "error": {
        "code": -32601,
        "message": "Method not found"
    },
    "id": "xyz"
}

Running https://github.com/btcsuite/btcd/releases/tag/v0.22.0-beta

@torkelrogstad
Copy link
Contributor Author

This PR implemented this in the rpcclient package for doing RPC calls to Bitcoin Core/btcd. It seems like it is not implemented server side.

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

Successfully merging this pull request may close these issues.

7 participants