mirror of https://github.com/ethereum/go-ethereum
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
241 B
14 lines
241 B
10 years ago
|
function HandleMessage(data) {
|
||
|
var message;
|
||
|
try { message = JSON.parse(data) } catch(e) {};
|
||
|
|
||
|
if(message) {
|
||
|
switch(message.type) {
|
||
|
case "coinbase":
|
||
|
return eth.coinBase();
|
||
|
case "block":
|
||
|
return eth.blockByNumber(0);
|
||
|
}
|
||
|
}
|
||
|
}
|