eth_submitHashrate
This commit is contained in:
parent
a34ad9216f
commit
9a06702505
@ -317,6 +317,15 @@ class Eth
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
'eth_submitHashrate' => [
|
||||||
|
'params' => [
|
||||||
|
[
|
||||||
|
'validators' => BlockHashValidator::class
|
||||||
|
], [
|
||||||
|
'validators' => BlockHashValidator::class
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1080,6 +1080,34 @@ class EthTest extends TestCase
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testSubmitHashrate
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testSubmitHashrate()
|
||||||
|
{
|
||||||
|
$eth = $this->eth;
|
||||||
|
|
||||||
|
$eth->submitHashrate(
|
||||||
|
'0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
|
||||||
|
'0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000'
|
||||||
|
, function ($err, $work) {
|
||||||
|
if ($err !== null) {
|
||||||
|
return $this->fail($err->getMessage());
|
||||||
|
}
|
||||||
|
if (isset($work->result)) {
|
||||||
|
$this->assertTrue(is_bool($work->result));
|
||||||
|
} else {
|
||||||
|
if (isset($work->error)) {
|
||||||
|
$this->assertTrue(is_string($work->error->message));
|
||||||
|
} else {
|
||||||
|
$this->assertTrue(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testUnallowedMethod
|
* testUnallowedMethod
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user