eth_getUncleCountByBlockNumber
This commit is contained in:
parent
2772c30ed1
commit
c957f36217
10
src/Eth.php
10
src/Eth.php
@ -96,6 +96,16 @@ class Eth
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
'eth_getUncleCountByBlockNumber' => [
|
||||||
|
'params' => [
|
||||||
|
[
|
||||||
|
'default' => 'latest',
|
||||||
|
'validators' => [
|
||||||
|
TagValidator::class, QuantityValidator::class,
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -337,6 +337,31 @@ class EthTest extends TestCase
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testGetUncleCountByBlockNumber
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testGetUncleCountByBlockNumber()
|
||||||
|
{
|
||||||
|
$eth = $this->web3->eth;
|
||||||
|
|
||||||
|
$eth->getUncleCountByBlockNumber('0x0', 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
|
* testUnallowedMethod
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user