Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
eth_getCompilers should return an empty array since we don't allow …
Browse files Browse the repository at this point in the history
…compilation

Fixes #139
  • Loading branch information
davidmurdoch committed Aug 31, 2018
1 parent 1cc5eb3 commit a3638a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/subproviders/geth_api_double.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ GethApiDouble.prototype.shh_version = function(callback) {
};

GethApiDouble.prototype.eth_getCompilers = function(callback) {
callback(null, ["solidity"]);
callback(null, []);
}

GethApiDouble.prototype.eth_syncing = function(callback) {
Expand Down
10 changes: 10 additions & 0 deletions test/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ var tests = function(web3) {
});
});

describe("eth_getCompilers", function() {
it.only("should return an empty array", function() {
return web3.eth.getCompilers()
.then(function(compilers) {
assert(Array.isArray(compilers));
assert.equal(0, compilers.length);
})
});
});

describe("eth_blockNumber", function() {
it("should return initial block number of zero", function(done) {
var number = web3.eth.getBlockNumber(function(err, result) {
Expand Down

0 comments on commit a3638a5

Please sign in to comment.