public static (H256 value, H256 mixHash) Eval(int epoch, H256 headerHash, ulong nonce) { var hash = Ethash.Hash256FromBytes(headerHash.Data); var context = Ethash.GetGlobalEpochContext(epoch); var result = Ethash.Hash(context, hash, nonce); //H256 mix { reinterpret_cast<byte*>(result.mix_hash.bytes), H256.ConstructFromPointer}; //H256 final { reinterpret_cast<byte*>(result.final_hash.bytes), H256.ConstructFromPointer}; //return { final, mix}; throw new NotImplementedException(); }
protected override void WorkLoop() { _startTime = DateTime.Now; // apply exponential sliding average _onWorkReceived(_f, this, new WorkPackage { Seed = H256.Random(), // We don't actually need a real seed as the epoch is calculated upon block number (see poolmanager) Header = H256.Random(), Block = _block, Boundary = new H256(WorkLoopBoundry) }); // submit new fake job while (_session != null) { var hr = _f.HashRate; _hrMax = Math.Max(_hrMax, hr); _hrMean = _hrAlpha * _hrMean + (1.0f - _hrAlpha) * hr; Thread.Sleep(200); } }
public static int FindEpochNumber(H256 h256) { throw new NotImplementedException(); }
internal static object Hash(EpochContext context, H256 hash, ulong nonce) { throw new NotImplementedException(); }