Comments (4)
Hi there,
Since Bitcoin 0.13.1 (segwit), the getblocktemplate() method no longer returns anything.I think this is due to the fact that you now need to specify a rule when calling getblocktemplate. For example, if you call:
bitcoin-cli getblocktemplate
You get this error:error code: -8 error message: Support for 'segwit' rule requires explicit client support
To get it working, you have to pass a rule like this as an extra argument, like so:
bitcoin-cli getblocktemplate '{"rules":["segwit"]}'
I'm trying with this:
CoinService.GetBlockTemplate("'{\"rules\":[\"segwit\"]}'")
but the result is:
"{\"result\":null,\"error\":{\"code\":-1,\"message\":\"JSON value is not an object as expected\"},\"id\":1}\n"
Is there any way to pass this argument to the CoinService.GetBlockTemplate() method to get it working again?
Against my 0.19.1 Bitcoin Core node, this call works:
var blockTemplate = CoinService.GetBlockTemplate( new { rules=new List<string> { "segwit" } });
So by supplying the parameters as an anonymous type you should be able to get the call to work. If you think the interface should work differentely, let me know.
from bitcoinlib.
@idt-byte, thank you for reporting this π I apologize for the delay, I hope @Sword-Smith can look into this (as per #116). Letβs give @Sword-Smith 3 days to respond.
from bitcoinlib.
Looking into it
from bitcoinlib.
Closing this as it works and the interface in my opinion is OK
from bitcoinlib.
Related Issues (20)
- Add createwallet HOT 1
- It produces errors with bitcoin core 0.17.1 HOT 4
- Add documentation comments to methods showing which units are returned HOT 1
- GetBlockResponse does not contain weight
- bitcoinlib support .net core? HOT 1
- NetworkHashPS exceeds Int64.Max resulting in overflow HOT 1
- GetRawMemPool(true) throws exception HOT 4
- Is this repo still maintained? HOT 6
- Add support for secure (.cookie) auth
- IsWalletEncrypted returns false positive
- Getting - Dummy value must be set to "" - after some of the method calls HOT 6
- Various 'Wallet' RPC Calls Require URL with '/wallet/<wallet-name>' appended HOT 1
- DecodeRawTransaction does not populate addresses
- GetAccount method returns empty string HOT 2
- ListSinceBlock passing wrong parameter by default HOT 4
- How to create transactions that carry messages in OP_RETURN HOT 2
- Getblocktemplate does not provide txid, only hash HOT 3
- No support for new label system HOT 4
- Exception while DumpWallet method HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitcoinlib.