mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-16 08:00:39 +00:00
13 lines
241 B
JavaScript
13 lines
241 B
JavaScript
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);
|
|
}
|
|
}
|
|
}
|