eth_getUncleCountByBlockHash
This commit is contained in:
parent
2f7a9f901b
commit
2772c30ed1
@ -89,6 +89,13 @@ class Eth
|
||||
]
|
||||
]
|
||||
],
|
||||
'eth_getUncleCountByBlockHash' => [
|
||||
'params' => [
|
||||
[
|
||||
'validators' => BlockHashValidator::class
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -312,6 +312,31 @@ class EthTest extends TestCase
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testGetUncleCountByBlockHash
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testGetUncleCountByBlockHash()
|
||||
{
|
||||
$eth = $this->web3->eth;
|
||||
|
||||
$eth->getUncleCountByBlockHash('0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238', function ($err, $uncleCount) {
|
||||
if ($err !== null) {
|
||||
return $this->fail($err->getMessage());
|
||||
}
|
||||
if (isset($uncleCount->result)) {
|
||||
$this->assertTrue(is_string($uncleCount->result));
|
||||
} else {
|
||||
if (isset($uncleCount->error)) {
|
||||
$this->fail($uncleCount->error->message);
|
||||
} else {
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testUnallowedMethod
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user