From abb0a7edc49c8ca9ccef4f72b4ff2deec45a524d Mon Sep 17 00:00:00 2001 From: Nicky Semenza Date: Tue, 17 Apr 2018 22:51:59 -0400 Subject: [PATCH 1/3] Update blockchain_double.js --- lib/blockchain_double.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/blockchain_double.js b/lib/blockchain_double.js index 775d0e970d..1f881bccb4 100644 --- a/lib/blockchain_double.js +++ b/lib/blockchain_double.js @@ -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, From 0c16bcbe02c7758871bb74941f68eb092d4528ac Mon Sep 17 00:00:00 2001 From: Nicky Semenza Date: Wed, 25 Apr 2018 16:07:35 -0400 Subject: [PATCH 2/3] test --- lib/utils/txhelper.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/utils/txhelper.js b/lib/utils/txhelper.js index f4abc5e5a5..cd9ba000f7 100644 --- a/lib/utils/txhelper.js +++ b/lib/utils/txhelper.js @@ -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.rpcDataHexString(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 && From cd5b6ca4bf79da769002c44bbb95a77c44501cd8 Mon Sep 17 00:00:00 2001 From: Ben Burns Date: Wed, 26 Sep 2018 22:54:35 -0700 Subject: [PATCH 3/3] Nonce is RPC Quantity string. --- lib/utils/txhelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/txhelper.js b/lib/utils/txhelper.js index cd9ba000f7..b90d6272de 100644 --- a/lib/utils/txhelper.js +++ b/lib/utils/txhelper.js @@ -14,7 +14,7 @@ module.exports = { } var resultJSON = { hash: to.rpcDataHexString(tx.hash()), - nonce: to.rpcDataHexString(tx.nonce), + nonce: to.rpcQuantityHexString(tx.nonce), blockHash: to.rpcDataHexString(block.hash()), blockNumber: to.rpcQuantityHexString(block.header.number), transactionIndex: to.rpcQuantityHexString(transactionIndex),