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

getblocktemplate in regtest mode #967

Open
AleksandrRadik opened this issue Jun 27, 2024 · 9 comments
Open

getblocktemplate in regtest mode #967

AleksandrRadik opened this issue Jun 27, 2024 · 9 comments

Comments

@AleksandrRadik
Copy link

Hi guys, I wanna test my mining software for Litecoin, and test it on regtest mode, but when I try to make getblocktemplate request I got error "Litecoin Core is not connected" as I guess, it's cause my node haven't any peer for connection to other node, cause they don't exist and i can't make this request

Expected behavior
Get response on getblocktemplate in regtest mode

Actual behavior

Got error
{
"result": null,
"error": {
"code": -9,
"message": "Litecoin Core is not connected!"
},
"id": "regtest"
}

To reproduce
Just try))

System information

Linux/Ubuntu

Idea for solution
I found that bitcoin-core meet the same problem, but ther make this changes and now it's work well, I know because before I work with Bitcoin Core in regtest. I don't check If you add the same to Litecoin, but maybe it can help.

Thank's for your attention!

@losh11
Copy link
Member

losh11 commented Jun 27, 2024 via email

@AleksandrRadik
Copy link
Author

Are you trying to make a rpc or p2p connection to litecoind? I’m assuming rpc. Make sure you’ve configured your litecoin.conf file correctly, like port, allowed ip, bind it to localhost etc.

On Thu, 27 Jun 2024 at 01:09, AlexRadik @.> wrote: Hi guys, I wanna test my mining software for Litecoin, and test it on regtest mode, but when I try to make getblocktemplate request I got error "Litecoin Core is not connected" as I guess, it's cause my node haven't any peer for connection to other node, cause they don't exist and i can't make this request Expected behavior Get response on getblocktemplate in regtest mode Actual behavior Got error { "result": null, "error": { "code": -9, "message": "Litecoin Core is not connected!" }, "id": "regtest" } To reproduce Just try)) System information Linux/Ubuntu Idea for solution I found that bitcoin-core meet the same problem, but ther make this changes <bitcoin@95d5d5e> and now it's work well, I know because before I work with Bitcoin Core in regtest. I don't check If you add the same to Litecoin, but maybe it can help. Thank's for your attention! — Reply to this email directly, view it on GitHub <#967>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAT43OSAKY2PUFG4PD4GSJLZJNJ2BAVCNFSM6AAAAABJ63DK4WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3TMNBWGY3DIMI . You are receiving this because you are subscribed to this thread.Message ID: @.>

Yep, I configure connectrion right, all other requests work fine (getblock. getblockchaininfo etc.) And for more info I provide litecoin.conf below:
regtest=1
server=1
rpcallowip=127.0.0.1
rpcuser=myusername
rpcpassword=mypassword

[regtest]
rpcbind=127.0.0.1
rpcport=18332

@AleksandrRadik
Copy link
Author

Hey guys, any tips or comments?) How I can run regtest node?

@AleksandrRadik
Copy link
Author

As I see, we need just to include this two if (on screen 1) in this TestChain check(screen2) like in bitcoin, is it posiible?
Screen 1:
image
Screen 2:
image

@AleksandrRadik
Copy link
Author

Can anyone accept this or decline? Maybe I need to make pull request for this fix?

@losh11
Copy link
Member

losh11 commented Jul 15, 2024

Would appreciate a PR.

@AleksandrRadik
Copy link
Author

got it, make this some later

@AleksandrRadik
Copy link
Author

AleksandrRadik commented Jul 24, 2024

Hi there, was busy some, now return to work with litecoin node, so create PR, wait for your approve/comments

@AleksandrRadik
Copy link
Author

@losh11 I made PR, what about accept this one?)

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

No branches or pull requests

2 participants