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

Commit

Permalink
Merge pull request #103 from nickysemenza/patch-1
Browse files Browse the repository at this point in the history
Update blockchain_double.js to properly hex encode Log without leading zeroes
  • Loading branch information
benjamincburns authored Sep 27, 2018
2 parents a136f62 + cd5b6ca commit 24eb4bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/blockchain_double.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ BlockchainDouble.prototype.processBlock = function(block, commit, callback) {
var data = to.hex(log[2]);

var log = new Log({
logIndex: to.hex(i),
transactionIndex: to.hex(v),
logIndex: to.rpcQuantityHexString(i),
transactionIndex: to.rpcQuantityHexString(v),
transactionHash: tx_hash,
block: block,
address: address,
Expand Down
22 changes: 11 additions & 11 deletions lib/utils/txhelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ module.exports = {
}
}
var resultJSON = {
hash: to.hex(tx.hash()),
nonce: to.hex(tx.nonce),
blockHash: to.hex(block.hash()),
blockNumber: to.hex(block.header.number),
transactionIndex: to.hex(transactionIndex),
from: to.hex(tx.from),
to: to.hex(tx.to),
value: to.hex(tx.value),
gas: to.hex(tx.gasLimit),
gasPrice: to.hex(tx.gasPrice),
input: to.hex(tx.data),
hash: to.rpcDataHexString(tx.hash()),
nonce: to.rpcQuantityHexString(tx.nonce),
blockHash: to.rpcDataHexString(block.hash()),
blockNumber: to.rpcQuantityHexString(block.header.number),
transactionIndex: to.rpcQuantityHexString(transactionIndex),
from: to.rpcDataHexString(tx.from),
to: to.rpcDataHexString(tx.to),
value: to.rpcQuantityHexString(tx.value),
gas: to.rpcQuantityHexString(tx.gasLimit),
gasPrice: to.rpcQuantityHexString(tx.gasPrice),
input: to.rpcDataHexString(tx.data),
};

if (tx.v && tx.v.length > 0 &&
Expand Down

0 comments on commit 24eb4bc

Please sign in to comment.