Fix contract creation

This commit is contained in:
nicksavers 2014-10-07 18:00:53 +02:00
parent 50f6a21ba8
commit 4093fc9e65
2 changed files with 11 additions and 9 deletions

View File

@ -175,7 +175,7 @@ public class Transaction {
}
public boolean isContractCreation() {
return Arrays.equals(this.receiveAddress, ByteUtil.EMPTY_BYTE_ARRAY);
return this.receiveAddress == null;
}
/*********

View File

@ -170,6 +170,7 @@ public class Wallet {
}
byte[] receiveAddress = transaction.getReceiveAddress();
if(receiveAddress != null) {
Account receiver = rows.get(Hex.toHexString(receiveAddress));
if (receiver != null) {
receiver.addPendingTransaction(transaction);
@ -179,6 +180,7 @@ public class Wallet {
"\n tx: [{}]",
Hex.toHexString(receiver.getAddress()), Hex.toHexString(transaction.getHash()));
}
}
this.notifyListeners();
}