Я загружаю биткойн-ядро отсюда https://bitcoin.org/en/download и пытаюсь подключиться к нему с C#. Я использую демонстрационный код отсюда
https:// github.com/cryptean/bitcoinlib
Я установил bitcoin.conf следующим образом:
Connecting to Bitcoin MainNet via RPC at http://127.0.0.1:8332...The RPC request was either not understood by the server or there was a problem executing the request
at BitcoinLib.RPC.Connector.RpcConnector.MakeRequest[T](RpcMethods rpcMethod, Object[] parameters) in C:\Users\pc\Downloads\bitcoinlib-master\bitcoinlib-master\src\BitcoinLib\RPC\Connector\RpcConnector.cs:line 125
at BitcoinLib.Services.CoinService.GetDifficulty() in C:\Users\pc\Downloads\bitcoinlib-master\bitcoinlib-master\src\BitcoinLib\Services\RpcServices\RpcService\RpcService.cs:line 225
at ConsoleClient.Program.Main() in C:\Users\pc\Downloads\bitcoinlib-master\bitcoinlib-master\demo\Program.cs:line 104
C:\Program Files\Bitcoin\daemon>bitcoind.exe -server
2023-01-01T19:01:43Z Ignoring unknown configuration value rpcpass
2023-01-01T19:01:43Z Bitcoin Core version v22.0.0 (release build)
2023-01-01T19:01:43Z Assuming ancestors of block 00000000000000000008a89e854d57e5667df88f1cdef6fde2fbca1de5b639ad have valid signatures.
2023-01-01T19:01:43Z Setting nMinimumChainWork=00000000000000000000000000000000000000001fa4663bbbe19f82de910280
2023-01-01T19:01:43Z Using the 'shani(1way,2way)' SHA256 implementation
2023-01-01T19:01:43Z Using RdSeed as additional entropy source
2023-01-01T19:01:43Z Using RdRand as an additional entropy source
2023-01-01T19:01:43Z Default data directory C:\Users\pc\AppData\Roaming\Bitcoin
2023-01-01T19:01:43Z Using data directory C:\Users\pc\AppData\Roaming\Bitcoin
2023-01-01T19:01:43Z Config file: C:\Users\pc\AppData\Roaming\Bitcoin\bitcoin.conf
2023-01-01T19:01:43Z Config file arg: rpcport="8332"
2023-01-01T19:01:43Z Config file arg: rpcuser=****
2023-01-01T19:01:43Z Config file arg: server="1"
2023-01-01T19:01:43Z Config file arg: txindex="1"
2023-01-01T19:01:43Z Setting file arg: wallet = ["btc1313"]
2023-01-01T19:01:43Z Command-line arg: server=""
2023-01-01T19:01:43Z Using at most 125 automatic connections (2048 file descriptors available)
2023-01-01T19:01:43Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2023-01-01T19:01:43Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2023-01-01T19:01:43Z Script verification uses 7 additional threads
2023-01-01T19:01:43Z scheduler thread start
2023-01-01T19:01:43Z HTTP: creating work queue of depth 16
2023-01-01T19:01:43Z Using random cookie authentication.
2023-01-01T19:01:43Z Generated RPC authentication cookie C:\Users\pc\AppData\Roaming\Bitcoin\.cookie
2023-01-01T19:01:43Z HTTP: starting 4 worker threads
2023-01-01T19:01:43Z Using wallet directory C:\Users\pc\AppData\Roaming\Bitcoin\wallets
2023-01-01T19:01:43Z init message: Verifying wallet(s)…
2023-01-01T19:01:43Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
2023-01-01T19:01:43Z Using wallet C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\wallet.dat
2023-01-01T19:01:43Z BerkeleyEnvironment::Open: LogDir=C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\database ErrorFile=C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\db.log
2023-01-01T19:01:43Z init message: Loading banlist…
2023-01-01T19:01:43Z SetNetworkActive: true
2023-01-01T19:01:43Z Using /16 prefix for IP bucketing
2023-01-01T19:01:43Z Cache configuration:
2023-01-01T19:01:43Z * Using 2.0 MiB for block index database
2023-01-01T19:01:43Z * Using 56.0 MiB for transaction index database
2023-01-01T19:01:43Z * Using 8.0 MiB for chain state database
2023-01-01T19:01:43Z * Using 384.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2023-01-01T19:01:43Z init message: Loading block index…
2023-01-01T19:01:43Z Switching active chainstate to Chainstate [ibd] @ height -1 (null)
2023-01-01T19:01:43Z Opening LevelDB in C:\Users\pc\AppData\Roaming\Bitcoin\blocks\index
2023-01-01T19:01:43Z Opened LevelDB successfully
2023-01-01T19:01:43Z Using obfuscation key for C:\Users\pc\AppData\Roaming\Bitcoin\blocks\index: 0000000000000000
2023-01-01T19:01:48Z LoadBlockIndexDB: last block file = 3337
2023-01-01T19:01:48Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=82, size=82069535, heights=769632...769908, time=2022-12-31...2023-01-01)
2023-01-01T19:01:48Z Checking all blk files are present...
2023-01-01T19:01:49Z Opening LevelDB in C:\Users\pc\AppData\Roaming\Bitcoin\chainstate
2023-01-01T19:01:49Z Opened LevelDB successfully
2023-01-01T19:01:49Z Using obfuscation key for C:\Users\pc\AppData\Roaming\Bitcoin\chainstate: 6343dde5e7e6e386
2023-01-01T19:01:49Z Loaded best chain: hashBestChain=000000000000000000039b1c6364ff45a20a879f9a834fe4ed5292cf63cf942a height=769908 date=2023-01-01T18:50:35Z progress=0.999998
2023-01-01T19:01:49Z init message: Verifying blocks…
2023-01-01T19:01:49Z Verifying last 6 blocks at level 3
2023-01-01T19:01:49Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].
2023-01-01T19:01:56Z No coin database inconsistencies in last 6 blocks (9918 transactions)
2023-01-01T19:01:56Z block index 12583ms
2023-01-01T19:01:56Z Opening LevelDB in C:\Users\pc\AppData\Roaming\Bitcoin\indexes\txindex
2023-01-01T19:01:56Z Opened LevelDB successfully
2023-01-01T19:01:56Z Using obfuscation key for C:\Users\pc\AppData\Roaming\Bitcoin\indexes\txindex: 0000000000000000
2023-01-01T19:01:56Z txindex thread start
2023-01-01T19:01:56Z init message: Loading wallet…
2023-01-01T19:01:56Z txindex is enabled at height 769908
2023-01-01T19:01:56Z txindex thread exit
2023-01-01T19:01:56Z BerkeleyEnvironment::Open: LogDir=C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\database ErrorFile=C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\db.log
2023-01-01T19:01:56Z [btc1313] Wallet File Version = 169900
2023-01-01T19:01:56Z [btc1313] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0
2023-01-01T19:01:56Z [btc1313] Wallet completed loading in 53ms
2023-01-01T19:01:56Z [btc1313] setKeyPool.size() = 2000
2023-01-01T19:01:56Z [btc1313] mapWallet.size() = 0
2023-01-01T19:01:56Z [btc1313] m_address_book.size() = 0
2023-01-01T19:01:56Z block tree size = 769909
2023-01-01T19:01:56Z nBestHeight = 769908
2023-01-01T19:01:56Z loadblk thread start
2023-01-01T19:01:56Z torcontrol thread start
2023-01-01T19:01:56Z Bound to 127.0.0.1:8334
2023-01-01T19:01:56Z Bound to [::]:8333
2023-01-01T19:01:56Z Bound to 0.0.0.0:8333
2023-01-01T19:01:56Z Leaving InitialBlockDownload (latching to false)
2023-01-01T19:01:56Z init message: Loading P2P addresses…
2023-01-01T19:01:56Z Loaded 63213 addresses from peers.dat 116ms
2023-01-01T19:01:56Z Loaded 2 addresses from "anchors.dat"
2023-01-01T19:01:56Z 2 block-relay-only anchors will be tried for connections.
2023-01-01T19:01:56Z init message: Starting network threads…
2023-01-01T19:01:56Z opencon thread start
2023-01-01T19:01:56Z addcon thread start
2023-01-01T19:01:56Z dnsseed thread start
2023-01-01T19:01:56Z Waiting 300 seconds before querying DNS seeds.
2023-01-01T19:01:56Z msghand thread start
2023-01-01T19:01:56Z init message: Done loading
2023-01-01T19:01:56Z net thread start
2023-01-01T19:01:57Z Imported mempool transactions from disk: 695 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast
2023-01-01T19:01:57Z loadblk thread exit
2023-01-01T19:01:57Z New outbound peer connected: version: 70016, blocks=769909, peer=0 (block-relay-only)
2023-01-01T19:01:58Z New outbound peer connected: version: 70015, blocks=769909, peer=1 (block-relay-only)
2023-01-01T19:01:59Z New outbound peer connected: version: 70016, blocks=769909, peer=2 (outbound-full-relay)
2023-01-01T19:02:04Z UpdateTip: new best=00000000000000000006266ea0383ab08afa37496e4b35ae218e1b03e26b607e height=769909 version=0x32bce000 log2_work=93.924929 tx=792623260 date='2023-01-01T19:00:40Z' progress=1.000000 cache=1.3MiB(9604txo)
2023-01-01T19:02:16Z New outbound peer connected: version: 70016, blocks=769909, peer=3 (outbound-full-relay)
2023-01-01T19:02:16Z New outbound peer connected: version: 70016, blocks=769909, peer=4 (outbound-full-relay)
2023-01-01T19:02:18Z P2P peers available. Skipped DNS seeding.
2023-01-01T19:02:18Z dnsseed thread exit
2023-01-01T19:02:23Z New outbound peer connected: version: 70016, blocks=769909, peer=5 (outbound-full-relay)
2023-01-01T19:02:35Z New outbound peer connected: version: 70016, blocks=769909, peer=6 (outbound-full-relay)
2023-01-01T19:08:44Z ThreadRPCServer incorrect password attempt from 127.0.0.1:49244
2023-01-01T19:08:44Z ThreadRPCServer incorrect password attempt from 127.0.0.1:49208
2023-01-01T19:08:44Z New outbound peer connected: version: 70015, blocks=769909, peer=39 (outbound-full-relay)
2023-01-01T19:08:44Z New outbound peer connected: version: 70016, blocks=769909, peer=41 (outbound-full-relay)
2023-01-01T19:08:44Z New outbound peer connected: version: 70015, blocks=769909, peer=43 (outbound-full-relay)
Я также читал об этой библиотеке NBitcoin, но не могу найти простой пример ее использования. Мои вопросы: каковы шаги по подключению ядра биткойна к C #, какую библиотеку лучше всего использовать? Как исправить эти ошибки, о которых я упоминал выше? Есть ли простой пример использования NBitcoin? Спасибо.
Я загружаю биткойн-ядро отсюда https://bitcoin.org/en/download и пытаюсь подключиться к нему с C#. Я использую демонстрационный код отсюда https:// github.com/cryptean/bitcoinlib Я установил bitcoin.conf следующим образом: [code]server=1 rpcport=8332 rpcuser=myuser rpcpass=mypass txindex=1 [/code] а вот app.config: [code]
[/code] и когда я запускаю демо-версию, произошла ошибка, вот сообщение об ошибке: [code]Connecting to Bitcoin MainNet via RPC at http://127.0.0.1:8332...The RPC request was either not understood by the server or there was a problem executing the request at BitcoinLib.RPC.Connector.RpcConnector.MakeRequest[T](RpcMethods rpcMethod, Object[] parameters) in C:\Users\pc\Downloads\bitcoinlib-master\bitcoinlib-master\src\BitcoinLib\RPC\Connector\RpcConnector.cs:line 125 at BitcoinLib.Services.CoinService.GetDifficulty() in C:\Users\pc\Downloads\bitcoinlib-master\bitcoinlib-master\src\BitcoinLib\Services\RpcServices\RpcService\RpcService.cs:line 225 at ConsoleClient.Program.Main() in C:\Users\pc\Downloads\bitcoinlib-master\bitcoinlib-master\demo\Program.cs:line 104 [/code] я не использую тестовую сеть, вот код: [code] private static void Main() { try { var data = RequestServer("getblockcount", new List() { "value" }); Console.WriteLine(data);
return;
Console.Write("\n\nConnecting to {0} {1}Net via RPC at {2}...", CoinService.Parameters.CoinLongName, (CoinService.Parameters.UseTestnet ? "Test" : "Main"), CoinService.Parameters.SelectedDaemonUrl);
// Transaction Details Console.WriteLine("\n\nMy transactions' details:"); foreach (var transaction in myTransactions) { // Move transactions don't have a txId, which this logic fails for if (transaction.Category == "move") { continue; }
Console.WriteLine("[Failed] {0} {1} {2}", exception.Message, errorCode != 0 ? "Error code: " + errorCode : string.Empty, !string.IsNullOrWhiteSpace(errorMessage) ? errorMessage : string.Empty); } catch (Exception exception) { //Console.WriteLine("[Failed]\n\nPlease check your configuration and make sure that the daemon is up and running and that it is synchronized. \n\nException: " + exception); Console.WriteLine(exception.Message+"\n"+exception.StackTrace.ToString()); } } [/code] также я пробую этот код: [code]public static string RequestServer(string methodName, List parameters) {
streamReader = new StreamReader(webResponse.GetResponseStream(), true);
respVal = streamReader.ReadToEnd(); var data = JsonConvert.DeserializeObject(respVal).ToString(); return data; } catch (Exception exp) { Console.WriteLine(exp.Message + "\n" + exp.StackTrace.ToString()); } finally { if (streamReader != null) { streamReader.Close(); }
} return string.Empty; }
var data = RequestServer("getblockcount", new List() { "value" }); Console.WriteLine(data); [/code] но произошла ошибка: [code]401 unauthorized .... [/code] я запускаю bitcoind из команды: [code]bitcoind.exe -server [/code] вот результат: [code] C:\Program Files\Bitcoin\daemon>bitcoind.exe -server 2023-01-01T19:01:43Z Ignoring unknown configuration value rpcpass 2023-01-01T19:01:43Z Bitcoin Core version v22.0.0 (release build) 2023-01-01T19:01:43Z Assuming ancestors of block 00000000000000000008a89e854d57e5667df88f1cdef6fde2fbca1de5b639ad have valid signatures. 2023-01-01T19:01:43Z Setting nMinimumChainWork=00000000000000000000000000000000000000001fa4663bbbe19f82de910280 2023-01-01T19:01:43Z Using the 'shani(1way,2way)' SHA256 implementation 2023-01-01T19:01:43Z Using RdSeed as additional entropy source 2023-01-01T19:01:43Z Using RdRand as an additional entropy source 2023-01-01T19:01:43Z Default data directory C:\Users\pc\AppData\Roaming\Bitcoin 2023-01-01T19:01:43Z Using data directory C:\Users\pc\AppData\Roaming\Bitcoin 2023-01-01T19:01:43Z Config file: C:\Users\pc\AppData\Roaming\Bitcoin\bitcoin.conf 2023-01-01T19:01:43Z Config file arg: rpcport="8332" 2023-01-01T19:01:43Z Config file arg: rpcuser=**** 2023-01-01T19:01:43Z Config file arg: server="1" 2023-01-01T19:01:43Z Config file arg: txindex="1" 2023-01-01T19:01:43Z Setting file arg: wallet = ["btc1313"] 2023-01-01T19:01:43Z Command-line arg: server="" 2023-01-01T19:01:43Z Using at most 125 automatic connections (2048 file descriptors available) 2023-01-01T19:01:43Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements 2023-01-01T19:01:43Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements 2023-01-01T19:01:43Z Script verification uses 7 additional threads 2023-01-01T19:01:43Z scheduler thread start 2023-01-01T19:01:43Z HTTP: creating work queue of depth 16 2023-01-01T19:01:43Z Using random cookie authentication. 2023-01-01T19:01:43Z Generated RPC authentication cookie C:\Users\pc\AppData\Roaming\Bitcoin\.cookie 2023-01-01T19:01:43Z HTTP: starting 4 worker threads 2023-01-01T19:01:43Z Using wallet directory C:\Users\pc\AppData\Roaming\Bitcoin\wallets 2023-01-01T19:01:43Z init message: Verifying wallet(s)… 2023-01-01T19:01:43Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2023-01-01T19:01:43Z Using wallet C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\wallet.dat 2023-01-01T19:01:43Z BerkeleyEnvironment::Open: LogDir=C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\database ErrorFile=C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\db.log 2023-01-01T19:01:43Z init message: Loading banlist… 2023-01-01T19:01:43Z SetNetworkActive: true 2023-01-01T19:01:43Z Using /16 prefix for IP bucketing 2023-01-01T19:01:43Z Cache configuration: 2023-01-01T19:01:43Z * Using 2.0 MiB for block index database 2023-01-01T19:01:43Z * Using 56.0 MiB for transaction index database 2023-01-01T19:01:43Z * Using 8.0 MiB for chain state database 2023-01-01T19:01:43Z * Using 384.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space) 2023-01-01T19:01:43Z init message: Loading block index… 2023-01-01T19:01:43Z Switching active chainstate to Chainstate [ibd] @ height -1 (null) 2023-01-01T19:01:43Z Opening LevelDB in C:\Users\pc\AppData\Roaming\Bitcoin\blocks\index 2023-01-01T19:01:43Z Opened LevelDB successfully 2023-01-01T19:01:43Z Using obfuscation key for C:\Users\pc\AppData\Roaming\Bitcoin\blocks\index: 0000000000000000 2023-01-01T19:01:48Z LoadBlockIndexDB: last block file = 3337 2023-01-01T19:01:48Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=82, size=82069535, heights=769632...769908, time=2022-12-31...2023-01-01) 2023-01-01T19:01:48Z Checking all blk files are present... 2023-01-01T19:01:49Z Opening LevelDB in C:\Users\pc\AppData\Roaming\Bitcoin\chainstate 2023-01-01T19:01:49Z Opened LevelDB successfully 2023-01-01T19:01:49Z Using obfuscation key for C:\Users\pc\AppData\Roaming\Bitcoin\chainstate: 6343dde5e7e6e386 2023-01-01T19:01:49Z Loaded best chain: hashBestChain=000000000000000000039b1c6364ff45a20a879f9a834fe4ed5292cf63cf942a height=769908 date=2023-01-01T18:50:35Z progress=0.999998 2023-01-01T19:01:49Z init message: Verifying blocks… 2023-01-01T19:01:49Z Verifying last 6 blocks at level 3 2023-01-01T19:01:49Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE]. 2023-01-01T19:01:56Z No coin database inconsistencies in last 6 blocks (9918 transactions) 2023-01-01T19:01:56Z block index 12583ms 2023-01-01T19:01:56Z Opening LevelDB in C:\Users\pc\AppData\Roaming\Bitcoin\indexes\txindex 2023-01-01T19:01:56Z Opened LevelDB successfully 2023-01-01T19:01:56Z Using obfuscation key for C:\Users\pc\AppData\Roaming\Bitcoin\indexes\txindex: 0000000000000000 2023-01-01T19:01:56Z txindex thread start 2023-01-01T19:01:56Z init message: Loading wallet… 2023-01-01T19:01:56Z txindex is enabled at height 769908 2023-01-01T19:01:56Z txindex thread exit 2023-01-01T19:01:56Z BerkeleyEnvironment::Open: LogDir=C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\database ErrorFile=C:\Users\pc\AppData\Roaming\Bitcoin\wallets\btc1313\db.log 2023-01-01T19:01:56Z [btc1313] Wallet File Version = 169900 2023-01-01T19:01:56Z [btc1313] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0 2023-01-01T19:01:56Z [btc1313] Wallet completed loading in 53ms 2023-01-01T19:01:56Z [btc1313] setKeyPool.size() = 2000 2023-01-01T19:01:56Z [btc1313] mapWallet.size() = 0 2023-01-01T19:01:56Z [btc1313] m_address_book.size() = 0 2023-01-01T19:01:56Z block tree size = 769909 2023-01-01T19:01:56Z nBestHeight = 769908 2023-01-01T19:01:56Z loadblk thread start 2023-01-01T19:01:56Z torcontrol thread start 2023-01-01T19:01:56Z Bound to 127.0.0.1:8334 2023-01-01T19:01:56Z Bound to [::]:8333 2023-01-01T19:01:56Z Bound to 0.0.0.0:8333 2023-01-01T19:01:56Z Leaving InitialBlockDownload (latching to false) 2023-01-01T19:01:56Z init message: Loading P2P addresses… 2023-01-01T19:01:56Z Loaded 63213 addresses from peers.dat 116ms 2023-01-01T19:01:56Z Loaded 2 addresses from "anchors.dat" 2023-01-01T19:01:56Z 2 block-relay-only anchors will be tried for connections. 2023-01-01T19:01:56Z init message: Starting network threads… 2023-01-01T19:01:56Z opencon thread start 2023-01-01T19:01:56Z addcon thread start 2023-01-01T19:01:56Z dnsseed thread start 2023-01-01T19:01:56Z Waiting 300 seconds before querying DNS seeds. 2023-01-01T19:01:56Z msghand thread start 2023-01-01T19:01:56Z init message: Done loading 2023-01-01T19:01:56Z net thread start 2023-01-01T19:01:57Z Imported mempool transactions from disk: 695 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast 2023-01-01T19:01:57Z loadblk thread exit 2023-01-01T19:01:57Z New outbound peer connected: version: 70016, blocks=769909, peer=0 (block-relay-only) 2023-01-01T19:01:58Z New outbound peer connected: version: 70015, blocks=769909, peer=1 (block-relay-only) 2023-01-01T19:01:59Z New outbound peer connected: version: 70016, blocks=769909, peer=2 (outbound-full-relay) 2023-01-01T19:02:04Z UpdateTip: new best=00000000000000000006266ea0383ab08afa37496e4b35ae218e1b03e26b607e height=769909 version=0x32bce000 log2_work=93.924929 tx=792623260 date='2023-01-01T19:00:40Z' progress=1.000000 cache=1.3MiB(9604txo) 2023-01-01T19:02:16Z New outbound peer connected: version: 70016, blocks=769909, peer=3 (outbound-full-relay) 2023-01-01T19:02:16Z New outbound peer connected: version: 70016, blocks=769909, peer=4 (outbound-full-relay) 2023-01-01T19:02:18Z P2P peers available. Skipped DNS seeding. 2023-01-01T19:02:18Z dnsseed thread exit 2023-01-01T19:02:23Z New outbound peer connected: version: 70016, blocks=769909, peer=5 (outbound-full-relay) 2023-01-01T19:02:35Z New outbound peer connected: version: 70016, blocks=769909, peer=6 (outbound-full-relay) 2023-01-01T19:08:44Z ThreadRPCServer incorrect password attempt from 127.0.0.1:49244 2023-01-01T19:08:44Z ThreadRPCServer incorrect password attempt from 127.0.0.1:49208 2023-01-01T19:08:44Z New outbound peer connected: version: 70015, blocks=769909, peer=39 (outbound-full-relay) 2023-01-01T19:08:44Z New outbound peer connected: version: 70016, blocks=769909, peer=41 (outbound-full-relay) 2023-01-01T19:08:44Z New outbound peer connected: version: 70015, blocks=769909, peer=43 (outbound-full-relay)
[/code] Я также читал об этой библиотеке NBitcoin, но не могу найти простой пример ее использования. Мои вопросы: каковы шаги по подключению ядра биткойна к C #, какую библиотеку лучше всего использовать? Как исправить эти ошибки, о которых я упоминал выше? Есть ли простой пример использования NBitcoin? Спасибо.
Ядро Биткойна не использует начальную фразу, поэтому я пытаюсь преобразовать начальную фразу в закрытый ключ, но по какой-то причине результат неверен.
Вот мой код: р>
import bip39 from bip39 ;
import * as bitcoin from bitcoinjs-lib ;
var mnemonic...
Каждый раз, когда я открываю spyder, консоль сталкивается с одной и той же ошибкой, возвращая сообщение об ошибке, которое заканчивается 'ZMQError: Адрес используется (addr='tcp://127.0.0.1:57242')' , что делает Spyder непригодным для...
Я разрабатываю многопоточную программу, в которой каждый важный поток привязан к своему ядру. В программе легко отслеживать используемые ядра и предотвращать привязку двух потоков к одному ядру (из-за ошибочной конфигурации).
Я провожу эксперимент на Ubuntu 7.9. Мое приложение C++ закрепляет один поток на ядре (скажем, 18, который взят из списка изолированных процессоров, выбранного из /sys/devices/system/cpu/isolated) с помощью pthread_setaffinity_np.