The Knuth team is pleased to announce 3 releases we have done this week. The most outstanding item of these 3 releases is the support for the new network, designed to test big/huge blocks: Scalenet.
This release includes the following features and fixes:
This release includes the following features and fixes:
This release includes the following features and fixes:
Based on the Knuth C-API version 0.6.0 .
Scalenet support.
Several fixes regarding to default node configuration.
Performance improvements.
Code style improvements.
If you would like to test the new Scalenet network using our C# API, you can follow these simple steps:
Using this library is very simple, since Knuth provides a NuGet package.
$ mkdir HelloScalenet
$ cd HelloScalenet
$ dotnet new console
$ dotnet add package kth-bch
3. Edit Program.cs
and write some code:
using System;
using System.Threading.Tasks;
using Knuth;
namespace HelloScalenet {
public class Program {
private static bool running_;
static async Task Main(string[] args) {
Console.CancelKeyPress += OnSigInterrupt;
var config = Knuth.Config.Settings.GetDefault(NetworkType.Scalenet);
using (var node = new Knuth.Node(config)) {
await node.LaunchAsync();
Console.WriteLine("Knuth node has been launched.");
running_ = true;
var height = await node.Chain.GetLastHeightAsync();
Console.WriteLine($"Current height in local copy: {height.Result}");
if (await DownloadSomeBlocks(node)) {
Console.WriteLine("Bitcoin Cash has been created!");
}
}
Console.WriteLine("Good bye!");
}
private static async Task<bool> DownloadSomeBlocks(Node node) {
UInt64 height = 12000;
while (running_) {
var res = await node.Chain.GetLastHeightAsync();
if (res.Result >= height) return true;
await Task.Delay(10000);
}
return false;
}
private static void OnSigInterrupt(object sender, ConsoleCancelEventArgs args) {
Console.WriteLine("Stop signal detected.");
args.Cancel = true;
running_ = false;
}
}
}
$ dotnet run
Importante note: You can see the prerequisites here .
For information about how to install Knuth, please visit our website at https://kth.cash/#download.
We thank Bitcoin Cash ecosystem for its warm support and constant feedback.
Sincerely,The Knuth team.