I am trying to send ethers using the following code:

//check if confirmed by both the owners
if(tr.confirmedByUbuntu && tr.confirmedByWindows) {
    bool withdrawal = tr.to.send(tr.value); //Send the ethers
    if(withdrawal) {
        ConfirmedTransaction(_confirmationHash, tr.to, tr.value, tr.data);
        delete pendingTransactions[_confirmationHash];  //Free up the storage on EVM
    } else {
        TransactionConfirmationFailed(_confirmationHash, tr.to, tr.value, tr.data);

The line where I am sending ethers, does withdraw ethers from the source contract but does not deposit in target account. I am doing it on a private network. In what scenarios can this happen? In case of send failure we should we would get the withdrawal result as false but I get that as true.

Full source code is at: https://gist.github.com/anonymous/e4fdac24643c7146a04bd9b3d96fbb4c

  • What kind of target you are sending to? Another contract? Account? How do confirm if the target receives ETH? – Mikko Ohtamaa Jul 19 '16 at 2:42
  • I am sending ethers to an account. I checked the target account in mist wallet. – Prabhat Jul 19 '16 at 2:45
  • Are the wallet and the contract in the same network? Please confirm the transaction with blockchain explorer. – Mikko Ohtamaa Jul 19 '16 at 2:48
  • Yeah, I have 2 laptops running on the same private network. I made them peers using admin.addPeer(). I had miner running on 1 of them. Let me check the transaction using block explorer. will be back in a while. – Prabhat Jul 19 '16 at 2:53
  • Try to check the transaction id at least with two independent applications – Mikko Ohtamaa Jul 19 '16 at 2:55

There is a known issue when you have a private network with only one miner. Even if your network is 'properly' configured your transaction will not propagate from the non-mining node to the mining node and therefore will never be included in a block.

You need to mine with both nodes so that your transaction can be included in a block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.