我正在为一个简单的C#应用程序使用https://github.com/MetacoSA/NBitcoin,它只是下载比特币区块链。
我已经完成的工作是通过NodesGroup下载块头
var parameters = new NodeConnectionParameters();
parameters.TemplateBehaviors.Add(new ChainBehavior());
var group = new NodesGroup(Network.Main, parameters, new NodeRequirement()
{
RequiredServices = NodeServices.Network
});
group.Connect();
//wait some time
var chain = parameters.TemplateBehaviors.Find<ChainBehavior>().Chain;我找到的下载完整块(包含事务)的唯一方法是使用单个Node
var node = new Node(/*whatever*/)
var blocks = node.GetBlocks(/*hash of the last block I want*/)所以我的问题是:有没有一种方法可以从NodesGroup中连接的节点直接并行下载完整的块(带有事务),就像我对块头所做的那样?
提前感谢!
发布于 2018-03-09 22:28:34
我刚刚得知,NBitcoin目前不支持此功能。我将不得不坚持使用单节点解决方案:
var node = new Node(/*whatever*/)
var blocks = node.GetBlocks(/*hash of the last block I want*/)https://stackoverflow.com/questions/48764582
复制相似问题