Skip to content

Commit 07c5cc3

Browse files
committed
1 parent e57d6ae commit 07c5cc3

7 files changed

Lines changed: 44 additions & 51 deletions

File tree

libevm/ExtVMFace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ using LogEntries = std::vector<LogEntry>;
6363
struct LocalisedLogEntry: public LogEntry
6464
{
6565
LocalisedLogEntry() {}
66-
LocalisedLogEntry(LogEntry const& _le, unsigned _number, h256 _sha3 = {}): LogEntry(_le), number(_number), sha3(_sha3) {}
66+
LocalisedLogEntry(LogEntry const& _le, unsigned _number, h256 _transactionHash = h256()): LogEntry(_le), number(_number), transactionHash(_transactionHash) {}
6767

6868
unsigned number = 0;
69-
h256 sha3;
69+
h256 transactionHash;
7070
};
7171

7272
using LocalisedLogEntries = std::vector<LocalisedLogEntry>;

libjsqrc/ethereumjs/dist/ethereum.js

Lines changed: 14 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libjsqrc/ethereumjs/dist/ethereum.js.map

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libjsqrc/ethereumjs/dist/ethereum.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libjsqrc/ethereumjs/lib/web3/contract.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ var addEventsToContract = function (contract, desc, address) {
159159
var parser = eventImpl.outputParser(e);
160160
return parser(data);
161161
};
162-
return web3.eth.filter(o, undefined, undefined, outputFormatter);
162+
return web3.eth.filter(o, undefined, undefined, outputFormatter);
163163
};
164164

165165
// this property should be used by eth.filter to check if object is an event

libjsqrc/ethereumjs/lib/web3/filter.js

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,30 +64,25 @@ var getOptions = function (options) {
6464
options.toBlock = options.latest;
6565
}
6666

67-
if (options.skip) {
68-
console.warn('"skip" is deprecated, is "offset" instead');
69-
options.offset = options.skip;
70-
}
71-
72-
if (options.max) {
73-
console.warn('"max" is deprecated, is "limit" instead');
74-
options.limit = options.max;
75-
}
76-
7767
// make sure topics, get converted to hex
7868
if(options.topics instanceof Array) {
7969
options.topics = options.topics.map(function(topic){
8070
return utils.toHex(topic);
8171
});
8272
}
8373

74+
var asBlockNumber = function(n) {
75+
if (n == null)
76+
return null;
77+
if (n == 'latest' || n == 'pending')
78+
return n;
79+
return utils.toHex(n);
80+
};
8481

8582
// evaluate lazy properties
8683
return {
87-
fromBlock: utils.toHex(options.fromBlock),
88-
toBlock: utils.toHex(options.toBlock),
89-
limit: utils.toHex(options.limit),
90-
offset: utils.toHex(options.offset),
84+
fromBlock: asBlockNumber(options.fromBlock),
85+
toBlock: asBlockNumber(options.toBlock),
9186
to: options.to,
9287
address: options.address,
9388
topics: options.topics
@@ -112,9 +107,9 @@ var filter = function(options, implementation, formatter) {
112107
// call the callbacks
113108
var onMessages = function (messages) {
114109
messages.forEach(function (message) {
115-
message = formatter ? formatter(message) : message;
110+
message = formatter ? formatter(message) : message;
116111
callbacks.forEach(function (callback) {
117-
callback(message);
112+
callback(message);
118113
});
119114
});
120115
};

libweb3jsonrpc/WebThreeStubServerBase.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,20 @@ static Json::Value toJson(dev::eth::TransactionSkeleton const& _t)
112112
static Json::Value toJson(dev::eth::LocalisedLogEntry const& _e)
113113
{
114114
Json::Value res;
115-
116-
res["data"] = toJS(_e.data);
117-
res["address"] = toJS(_e.address);
118-
res["topics"] = Json::Value(Json::arrayValue);
119-
for (auto const& t: _e.topics)
120-
res["topics"].append(toJS(t));
121-
res["number"] = _e.number;
122-
res["hash"] = toJS(_e.sha3);
115+
if (_e.transactionHash)
116+
{
117+
res["data"] = toJS(_e.data);
118+
res["address"] = toJS(_e.address);
119+
res["topics"] = Json::Value(Json::arrayValue);
120+
for (auto const& t: _e.topics)
121+
res["topics"].append(toJS(t));
122+
res["number"] = _e.number;
123+
res["hash"] = toJS(_e.transactionHash);
124+
}
123125
return res;
124126
}
125127

126-
static Json::Value toJson(dev::eth::LocalisedLogEntries const& _es) // commented to avoid warning. Uncomment once in use @ poC-7.
128+
static Json::Value toJson(dev::eth::LocalisedLogEntries const& _es)
127129
{
128130
Json::Value res(Json::arrayValue);
129131
for (dev::eth::LocalisedLogEntry const& e: _es)

0 commit comments

Comments
 (0)