mining.set_difficultyストラタムメソッド詳細情報

従うし、今共有!

マイニング.set_difficulty is one of the in the stratum protocol defined methods for communication between mining pools and miners of encrypted currencies.

Function of mining.set_difficulty:

This method call is only sent from an pool to a miners and expect no response. The single argument is the new minimal difficulty, shares must have to get accepted by the pool. Miners should start using the new difficulty, with the start of the next job, so most pools send the method mining.notify with the argument Clean Jobs として true immediately afterward to force a new job start. The initial difficulty become send in the response of mining.subscript, but some pools answer just with a dummy difficulty value and overwrites this direct by a call of マイニング.set_difficulty. Pools may adjust the difficulty according to the hashing power of their clients the difficulty individuality, to reduce network traffic and computing time.

Hint:

Don’t be confused by the difficulty, need to be a new block for the blockchain of the currency, often called the network difficulty. That’s send in the argument bits of the method mining.notify

mining.set_difficulty call:

Hint:

Extra line-wrapping for readability. Spaces get ignored, a call ends with a line feed. (UTF-8 10/0x0A)

Description:

{
"id": <request id of any type>,
"method": "mining.set_difficulty",
"params": [ <difficulty as number> ]
}
(\n)

The id field doesn’t matter, マイニング.set_difficulty doesn’t expect a response. The params list contains just the difficulty as a single number.

Example:

{
"id": null,
"method": "mining.set_difficulty",
"params": [ 4096 ]
}
(\n)

mining.set_difficulty response:

マイニング.set_difficulty doesn’t have a defined response.

Java example implementation:

public final class StratumSender {
private static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
private static final String STRATUM_REQUEST_BASE =
"{\"id\":%s,\"method\":\"%s\",\"params\":[%s]}\n";
private final OutputStream out;
public StratumSender(final OutputStream out) {
if(out == null) {
throw new IllegalArgumentException("out == null");
}
this.out = out;
}
public void setDifficulty(final int newDiff) {
if(newDiff < 1) {
throw new IllegalArgumentException("Possible lowest difficulty is 1.");
}
final String f = String.format(STRATUM_REQUEST_BASE, null,
"mining.set_difficulty", newDiff);
final byte[] bs = f.getBytes(DEFAULT_CHARSET);
try {
out.write(bs);
} catch (final IOException e) {
throw new RuntimeException(e);
}// don't forget to flush the output
}
}

ここにあなたのコメントを投稿

あなたのメールアドレスは公開されません。 必須フィールドは、マークされています *

無料デモ!

今すぐキャロウェイ暗号システムに参加して、
無料のデモアカウントを取得するには:

Join the Calloway Crypto Soft now!

今全体を読む レビュー

その他のご質問やご質問がある場合は、直ちにメールでお問い合わせください。 earnmoneytodayblog@gmail.com または単純なを使用します お問い合わせフォーム

 

獲得 money.today 成功の挑戦: 1041/2000 成功するトレーダー。今テストします。 キャロウェイの暗号システム または他の検証済み取引システムを無料で、どのように成功しているとどのくらいの利益を送っており、我々 があなたのために何ができるか可能性があります。

52%

最後の成功した貿易業者:
アンティエ B.
次のこと!