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

Commit

Permalink
Merge pull request #864 from ethcore/fixed_855
Browse files Browse the repository at this point in the history
fixed #855
  • Loading branch information
debris committed Apr 1, 2016
2 parents 7f1a1b7 + 0681346 commit 71dd9fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ use service::{NetSyncMessage, SyncMessage};
use env_info::LastHashes;
use verification::*;
use block::*;
use transaction::{LocalizedTransaction, SignedTransaction};
use transaction::{LocalizedTransaction, SignedTransaction, Action};
use extras::TransactionAddress;
use filter::Filter;
use log_entry::LocalizedLogEntry;
use block_queue::{BlockQueue, BlockQueueInfo};
use blockchain::{BlockChain, BlockProvider, TreeRoute, ImportRoute};
use client::{BlockId, TransactionId, UncleId, ClientConfig, BlockChainClient};
use env_info::EnvInfo;
use executive::{Executive, Executed};
use executive::{Executive, Executed, contract_address};
use receipt::LocalizedReceipt;
pub use blockchain::CacheSize as BlockChainCacheSize;

Expand Down Expand Up @@ -577,8 +577,10 @@ impl<V> BlockChainClient for Client<V> where V: Verifier {
// TODO: to fix this, query all previous transaction receipts and retrieve their gas usage
cumulative_gas_used: receipt.gas_used,
gas_used: receipt.gas_used,
// TODO: to fix this, store created contract address in db
contract_address: None,
contract_address: match tx.action {
Action::Call(_) => None,
Action::Create => Some(contract_address(&tx.sender().unwrap(), &tx.nonce))
},
logs: receipt.logs.into_iter().enumerate().map(|(i, log)| LocalizedLogEntry {
entry: log,
block_hash: block_hash.clone(),
Expand Down

0 comments on commit 71dd9fb

Please sign in to comment.