eth_mining.
This commit is contained in:
parent
413c1abb68
commit
5ba3ed1371
@ -25,6 +25,7 @@ class Eth
|
|||||||
'eth_protocolVersion' => [],
|
'eth_protocolVersion' => [],
|
||||||
'eth_syncing' => [],
|
'eth_syncing' => [],
|
||||||
'eth_coinbase' => [],
|
'eth_coinbase' => [],
|
||||||
|
'eth_mining' => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -94,6 +94,27 @@ class EthTest extends TestCase
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testMining
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testMining()
|
||||||
|
{
|
||||||
|
$eth = $this->web3->eth;
|
||||||
|
|
||||||
|
$eth->mining(function ($err, $mining) {
|
||||||
|
if ($err !== null) {
|
||||||
|
return $this->fail($err->getMessage());
|
||||||
|
}
|
||||||
|
if (isset($mining->result)) {
|
||||||
|
$this->assertTrue($mining->result !== null);
|
||||||
|
} else {
|
||||||
|
$this->fail($mining->error->message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testUnallowedMethod
|
* testUnallowedMethod
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user