代码的活动使用语句是:
using System;
using System.Threading;
using System.Threading.Tasks;
using System.IO;
using Nethereum.Web3;
using Nethereum.Web3.Accounts;
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.Contracts;
using Nethereum.Hex.HexConvertors;
using Nethereum.RPC.Eth.DTOs; //using Nethereum.Geth;
Microsoft Visual C# 2017中的lint找不到以下功能:
web3.Miner.Start.SendRequestAsync(6);
它将Miner标记为非web3
成员。
注意:我在代码中将web3
声明为:
var web3 = new Web3(myAccount);
我该怎么解决这个问题?
发布于 2018-03-31 20:59:14
新版本的Nethereum将共享的RPC与Geth提供的客户端特定的API和功能分隔开来。
要与Nethereum.Geth交互,现在需要添加nuget包Nethereum.Geth,而不是使用Web3Geth类,而不是Web3类:
var web3 = new Web3Geth(myAccount);
web3.Miner.Start.SendRequestAsync(6);
https://ethereum.stackexchange.com/questions/42518
复制相似问题