Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve parity nodes invalid "eth_getBlockByNumber" JSONRPC call #2847

Merged
merged 11 commits into from
May 31, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/**
* @file TransactionObserver.js
* @author Samuel Furter <samuel@ethereum.org>
* @author Josh Stevens <joshstevens19@hotmail.co.uk>
* @date 2019
*/

Expand Down Expand Up @@ -147,8 +148,10 @@ export default class TransactionObserver {
this.getTransactionReceiptMethod.parameters = [transactionHash];

const receipt = await this.getTransactionReceiptMethod.execute();

if (receipt) {

// on parity nodes you can get the receipt without it being mined
// so the receipt may not have a block number at this point
if (receipt && receipt.blockNumber) {
if (this.lastBlock) {
const block = await this.getBlockByNumber(this.lastBlock.number + 1);

Expand Down