Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
don't unconditionally set block number in RPC transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
rphmeier committed Oct 24, 2017
1 parent 4673d4b commit 50c7142
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions rpc/src/v1/helpers/light_fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pub fn extract_transaction_at_index(block: encoded::Block, index: usize, eip86_t
.and_then(|tx| SignedTransaction::new(tx).ok())
.map(|tx| Transaction::from_signed(tx, block.number(), eip86_transition))
.map(|mut tx| {
tx.block_number = Some(block.number().into);
tx.block_hash = Some(block.hash().into());
tx.transaction_index = Some(index.into());
tx
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/v1/types/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ impl Transaction {
hash: t.hash().into(),
nonce: t.nonce.into(),
block_hash: None,
block_number: Some(block_number.into()),
block_number: None,
transaction_index: None,
from: t.sender().into(),
to: match t.action {
Expand Down

0 comments on commit 50c7142

Please sign in to comment.