eth_getUncleByBlockNumberAndIndex
This commit is contained in:
parent
00afa82f0b
commit
24deddeade
11
src/Eth.php
11
src/Eth.php
@ -226,6 +226,17 @@ class Eth
|
||||
]
|
||||
]
|
||||
],
|
||||
'eth_getUncleByBlockNumberAndIndex' => [
|
||||
'params' => [
|
||||
[
|
||||
'validators' => [
|
||||
QuantityValidator::class, TagValidator::class
|
||||
]
|
||||
], [
|
||||
'validators' => QuantityValidator::class
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -708,6 +708,31 @@ class EthTest extends TestCase
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testGetUncleByBlockNumberAndIndex
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testGetUncleByBlockNumberAndIndex()
|
||||
{
|
||||
$eth = $this->eth;
|
||||
|
||||
$eth->getUncleByBlockNumberAndIndex('0xe8', '0x0', function ($err, $uncle) {
|
||||
if ($err !== null) {
|
||||
return $this->fail($err->getMessage());
|
||||
}
|
||||
if (isset($uncle->result)) {
|
||||
$this->assertTrue(is_string($uncle->result));
|
||||
} else {
|
||||
if (isset($uncle->error)) {
|
||||
$this->fail($uncle->error->message);
|
||||
} else {
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testUnallowedMethod
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user